暫無描述

debugshadowmap.vert 417B

1234567891011121314151617181920
  1. #version 450
  2. layout(push_constant) uniform PushConsts {
  3. vec4 position;
  4. uint cascadeIndex;
  5. } pushConsts;
  6. layout (location = 0) out vec2 outUV;
  7. layout (location = 1) out uint outCascadeIndex;
  8. out gl_PerVertex {
  9. vec4 gl_Position;
  10. };
  11. void main()
  12. {
  13. outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
  14. outCascadeIndex = pushConsts.cascadeIndex;
  15. gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f);
  16. }