34 lines
851 B
GLSL
34 lines
851 B
GLSL
#version 450 core
|
|
layout (points) in;
|
|
layout (triangle_strip, max_vertices = 4) out;
|
|
layout (invocations = 20) in;
|
|
layout (std140, binding = 1) uniform LightsBlock
|
|
{
|
|
vec4 posBool[20];
|
|
vec4 colRad[20];
|
|
} ;
|
|
float theBool = posBool[gl_InvocationID].w;
|
|
out vec2 gTexPos;
|
|
void main()
|
|
{
|
|
if (theBool == 1){
|
|
gTexPos = vec2(0,1);
|
|
gl_Position = vec4(-1,1,0,1) ;
|
|
gl_Layer = gl_InvocationID;
|
|
EmitVertex();
|
|
gTexPos = vec2(0,0);
|
|
gl_Position = vec4(-1,-1,0,1) ;
|
|
gl_Layer = gl_InvocationID;
|
|
EmitVertex();
|
|
gTexPos = vec2(1,1);
|
|
gl_Position = vec4(1,1,0,1) ;
|
|
gl_Layer = gl_InvocationID;
|
|
EmitVertex();
|
|
gTexPos = vec2(1,0);
|
|
gl_Position = vec4(1,-1,0,1) ;
|
|
gl_Layer = gl_InvocationID;
|
|
EmitVertex();
|
|
EndPrimitive();
|
|
}else {}
|
|
}
|