Continued with lighting
This commit is contained in:
parent
597a14743b
commit
e88d972ecc
12 changed files with 95 additions and 6 deletions
|
|
@ -11,7 +11,7 @@ out vec2 FragPos;
|
|||
|
||||
void main() {
|
||||
vTexture = aTex;
|
||||
|
||||
|
||||
FragPos = vec2(ModelMatrix * vec4(aPos, 1));
|
||||
|
||||
gl_Position = MVP * vec4(aPos, 1);
|
||||
|
|
|
|||
|
|
@ -4,13 +4,17 @@ 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 vertex();
|
||||
|
||||
void main() {
|
||||
vTexture = aTex;
|
||||
|
||||
FragPos = vec2(ModelMatrix * vec4(aPos, 1));
|
||||
|
||||
gl_Position = MVP * vec4(aPos, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ namespace SM.Base.PostProcess
|
|||
GL.BindVertexArray(Plate.Object);
|
||||
|
||||
Uniforms["MVP"].SetMatrix4(PostProcessEffect.Mvp);
|
||||
Uniforms["ModelMatrix"].SetMatrix4(PostProcessEffect.Model);
|
||||
Uniforms["renderedTexture"].SetTexture(color, 0);
|
||||
|
||||
GL.DrawArrays(PrimitiveType.Quads, 0, 4);
|
||||
|
|
@ -72,6 +73,7 @@ namespace SM.Base.PostProcess
|
|||
GL.BindVertexArray(Plate.Object);
|
||||
|
||||
Uniforms["MVP"].SetMatrix4(PostProcessEffect.Mvp);
|
||||
Uniforms["ModelMatrix"].SetMatrix4(PostProcessEffect.Model);
|
||||
Uniforms["renderedTexture"].SetTexture(color, 0);
|
||||
|
||||
setUniformAction(Uniforms);
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ namespace SM.Base
|
|||
MouseState = Mouse.GetState()
|
||||
};
|
||||
|
||||
if (context.KeyboardState[Key.AltLeft] && context.KeyboardState[Key.F4]) Close();
|
||||
|
||||
Update(e, ref context);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue