Improved PostProcessing System
This commit is contained in:
parent
0ab7f29b06
commit
e4e7db8dc0
10 changed files with 181 additions and 6 deletions
|
|
@ -4,11 +4,15 @@ layout(location = 0) in vec3 aPos;
|
|||
layout(location = 1) in vec2 aTex;
|
||||
|
||||
uniform mat4 MVP;
|
||||
uniform mat4 ModelMatrix;
|
||||
|
||||
out vec2 vTexture;
|
||||
out vec2 FragPos;
|
||||
|
||||
void main() {
|
||||
vTexture = aTex;
|
||||
|
||||
FragPos = vec2(ModelMatrix * vec4(aPos, 1));
|
||||
|
||||
gl_Position = MVP * vec4(aPos, 1);
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ using System.Diagnostics;
|
|||
using OpenTK;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.Base.Objects.Static;
|
||||
using SM.Base.Scene;
|
||||
using SM.OGL.Framebuffer;
|
||||
using SM.OGL.Shaders;
|
||||
|
||||
|
|
@ -12,6 +13,7 @@ namespace SM.Base.PostProcess
|
|||
public abstract class PostProcessEffect
|
||||
{
|
||||
internal static Matrix4 Mvp;
|
||||
internal static Matrix4 Model;
|
||||
|
||||
public virtual ICollection<Framebuffer> RequiredFramebuffers { get; }
|
||||
|
||||
|
|
@ -26,5 +28,10 @@ namespace SM.Base.PostProcess
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void SceneChanged(GenericScene scene)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue