Files
loop/shader/shadow/light.geom
T

26 lines
545 B
GLSL

#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 {}
}