Debian Codegraph @

servers/rendering/renderer_rd/shaders/effects/shadow_frustum.glsl

raw
1 /* clang-format off */
2 #[vertex]
3
4 #version 450
5
6 #VERSION_DEFINES
7
8 /* clang-format on */
9
10 layout(push_constant, std430) uniform Info {
11 mat4 mvp;
12 vec4 color;
13 }
14 info;
15
16 layout(location = 0) in vec3 vertex_attrib;
17
18 void main() {
19 vec4 vertex = info.mvp * vec4(vertex_attrib, 1.0);
20 vertex.xyz /= vertex.w;
21 gl_Position = vec4(vertex.xy, 0.0, 1.0);
22 }
23
24 /* clang-format off */
25 #[fragment]
26
27 #version 450
28
29 #VERSION_DEFINES
30
31 layout(push_constant, std430) uniform Info {
32 mat4 mvp;
33 vec4 color;
34 }
35 info;
36
37 layout(location = 0) out vec4 frag_color;
38
39 void main() {
40 frag_color = info.color;
41 }