2024-02-24 22:52:29 +11:00
|
|
|
|
|
|
|
#version 460 core
|
|
|
|
|
|
|
|
layout (triangles) in;
|
|
|
|
layout (triangle_strip, max_vertices=18) out;
|
|
|
|
|
|
|
|
uniform mat4 shadow_mats[6];
|
|
|
|
|
2024-03-03 12:12:21 +11:00
|
|
|
in flat int should_ignore[];
|
2024-02-25 21:54:51 +11:00
|
|
|
out vec3 frag_pos;
|
2024-02-24 22:52:29 +11:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2024-03-03 12:12:21 +11:00
|
|
|
if(should_ignore[0] != 0) return;
|
2024-02-25 21:54:51 +11:00
|
|
|
|
2024-02-24 22:52:29 +11:00
|
|
|
for(int i = 0; i < 6; i++)
|
|
|
|
{
|
|
|
|
gl_Layer = i;
|
|
|
|
|
|
|
|
for(int j = 0; j < 3; j++)
|
|
|
|
{
|
2024-02-25 21:54:51 +11:00
|
|
|
vec4 fp = gl_in[j].gl_Position;
|
|
|
|
gl_Position = shadow_mats[i] * fp;
|
|
|
|
frag_pos = fp.xyz;
|
2024-02-24 22:52:29 +11:00
|
|
|
|
|
|
|
EmitVertex();
|
|
|
|
}
|
|
|
|
|
|
|
|
EndPrimitive();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|