pass.vert.glsl 308 B

12345678910111213141516
  1. #version 450
  2. in vec2 pos;
  3. out vec2 texCoord;
  4. void main() {
  5. // Scale vertex attribute to 0-1 range
  6. const vec2 madd = vec2(0.5, 0.5);
  7. texCoord = pos.xy * madd + madd;
  8. #if defined(HLSL) || defined(METAL) || defined(SPIRV)
  9. texCoord.y = 1.0 - texCoord.y;
  10. #endif
  11. gl_Position = vec4(pos.xy, 0.0, 1.0);
  12. }