pass.vert.glsl 276 B

1234567891011121314151617
  1. #version 450
  2. in vec2 pos;
  3. out vec2 tex_coord;
  4. void main() {
  5. // Scale vertex attribute to [0-1] range
  6. const vec2 madd = vec2(0.5, 0.5);
  7. tex_coord = pos.xy * madd + madd;
  8. #ifdef GLSL
  9. #else
  10. tex_coord.y = 1.0 - tex_coord.y;
  11. #endif
  12. gl_Position = vec4(pos.xy, 0.0, 1.0);
  13. }