shadow_frustum.glsl 579 B

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