Reorganise shaders

This commit is contained in:
2021-03-21 12:50:27 +01:00
parent a8ebf2f7f1
commit cf5a8b3e1b
32 changed files with 22 additions and 60 deletions
+31
View File
@@ -0,0 +1,31 @@
#version 430 core
layout (triangles) in;
layout (triangle_strip, max_vertices = 4) out;
in vec4 vParams[];
uniform mat4 worldMat;
vec2 lightPos = gl_in[0].gl_Position.xy;
vec2 cornerA = gl_in[1].gl_Position.xy;
vec2 cornerB = gl_in[2].gl_Position.xy;
void main()
{
gl_Position = worldMat * vec4(cornerA, 1, 1 );
EmitVertex();
gl_Position = worldMat * (vec4(cornerA, 10, 1 ) + (20,20,0,0));
gl_Position = vec4(1,0, 10, 1 );
EmitVertex();
gl_Position = worldMat * vec4(cornerB, 0, 1 );
gl_Position = vec4(0,1, -10, 1 );
EmitVertex();
gl_Position = worldMat * (vec4(cornerB, 0, 1 ) + (20,20,0,0));
gl_Position = vec4(1,1, 10, 1 );
EmitVertex();
EndPrimitive();
}