+ comments to the SM.Base

+ Length, Normalize methods for CVectors
This commit is contained in:
Michel Fedde 2020-12-19 20:49:16 +01:00
parent 5d4b360b05
commit 9b917ac181
18 changed files with 248 additions and 33 deletions

View file

@ -10,25 +10,39 @@ using SM.OGL.Shaders;
namespace SM.Base.PostProcess
{
/// <summary>
/// Basis for a post process effect
/// </summary>
public abstract class PostProcessEffect
{
internal static Matrix4 Mvp;
internal static Matrix4 Model;
public virtual ICollection<Framebuffer> RequiredFramebuffers { get; }
/// <summary>
/// Method, to initialize the shader.
/// </summary>
public virtual void Init() {}
/// <summary>
/// Method, to initialize the shader.
/// </summary>
public virtual void Init(Framebuffer main)
{
Init();
}
public virtual void Draw(Framebuffer main, Framebuffer target)
{
}
/// <summary>
/// Method to draw the actual effect.
/// </summary>
/// <param name="main">The framebuffer, that was used.</param>
/// <param name="target">The framebuffer, the system should draw to.</param>
public abstract void Draw(Framebuffer main, Framebuffer target);
/// <summary>
/// Event, when the scene changed.
/// </summary>
public virtual void SceneChanged(GenericScene scene)
{