Untitled
Toggle main menu visibility
Loading...
Searching...
No Matches
point_light_shadows.geom
Go to the documentation of this file.
1
2
#version 330 core
3
layout (triangles) in;
4
layout (triangle_strip, max_vertices=18) out;
5
6
7
8
uniform mat4 vp[6];
9
uniform uint uLayerOffset;
10
11
out vec3 FragWorldPos;
12
flat out uint vMat;
13
out vec2 vUV;
14
in VS_OUT
15
{
16
uint Mat;
17
vec2 UV;
18
19
} gs_in[];
20
21
void main()
22
{
23
24
for (int i = 0; i < 6; ++i)
25
{
26
gl_Layer = int(uLayerOffset) + i;
27
for (int j = 0; j < 3; ++j)
28
{
29
vec4 pos = gl_in[j].gl_Position;
30
gl_Position = vp[i] * pos;
31
FragWorldPos = pos.xyz;
32
vUV = gs_in[0].UV;
33
vMat = gs_in[0].Mat;
34
EmitVertex();
35
36
}
37
38
EndPrimitive();
39
}
40
41
42
}
43
44
src
render
point_light_shadows.geom
Generated by
1.18.0