1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Merge pull request #77085 from BastiaanOlij/visualise_direction_shadowmap_frustum

Draw frustum splices ontop of direction shadow atlas for debug purposes
This commit is contained in:
Yuri Sizov
2023-07-12 21:02:25 +02:00
9 changed files with 515 additions and 30 deletions

View File

@@ -0,0 +1,41 @@
/* clang-format off */
#[vertex]
#version 450
#VERSION_DEFINES
/* clang-format on */
layout(push_constant, std430) uniform Info {
mat4 mvp;
vec4 color;
}
info;
layout(location = 0) in vec3 vertex_attrib;
void main() {
vec4 vertex = info.mvp * vec4(vertex_attrib, 1.0);
vertex.xyz /= vertex.w;
gl_Position = vec4(vertex.xy, 0.0, 1.0);
}
/* clang-format off */
#[fragment]
#version 450
#VERSION_DEFINES
layout(push_constant, std430) uniform Info {
mat4 mvp;
vec4 color;
}
info;
layout(location = 0) out vec4 frag_color;
void main() {
frag_color = info.color;
}