Work on geometry shader based shadows

This commit is contained in:
2023-03-11 22:59:19 +00:00
parent 5724a0543e
commit 7ee3f6581d
18 changed files with 235 additions and 144 deletions
+25
View File
@@ -0,0 +1,25 @@
#version 450 core
layout (triangles) in;
layout (triangle_strip, max_vertices = 3) out;
layout (invocations = 20) in;
layout (std140, binding = 1) uniform LightsBlock
{
vec4 posBool[20];
vec4 colRad[20];
} ;
float theBool = posBool[gl_InvocationID].w;
in vec2 vTexPos[];
out vec2 gTexPos;
void main()
{
if (theBool == 1){
for (int i = 0; i < 3; i++)
{
gTexPos = vTexPos[i];
gl_Layer = gl_InvocationID;
gl_Position = gl_in[i].gl_Position;
EmitVertex();
}
EndPrimitive();
}else {}
}