pass.vert.glsl 291 B

123456789101112131415161718
  1. #version 450
  2. #include "compiled.inc"
  3. in vec2 pos;
  4. out vec2 texCoord;
  5. void main() {
  6. // Scale vertex attribute to 0-1 range
  7. const vec2 madd = vec2(0.5, 0.5);
  8. texCoord = pos.xy * madd + madd;
  9. #ifdef HLSL
  10. texCoord.y = 1.0 - texCoord.y;
  11. #endif
  12. gl_Position = vec4(pos.xy, 0.0, 1.0);
  13. }