暫無描述

composition.vert 332B

1234567891011121314151617
  1. #version 450
  2. #extension GL_ARB_separate_shader_objects : enable
  3. #extension GL_ARB_shading_language_420pack : enable
  4. layout (location = 0) out vec2 outUV;
  5. out gl_PerVertex
  6. {
  7. vec4 gl_Position;
  8. };
  9. void main()
  10. {
  11. outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
  12. gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f);
  13. }