QuadVert.glsl 402 B

12345678910111213141516
  1. // Copyright (C) 2009-2022, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Shaders/Common.glsl>
  6. layout(location = 0) out Vec2 out_uv;
  7. void main()
  8. {
  9. out_uv = Vec2(gl_VertexID & 1, gl_VertexID >> 1) * 2.0;
  10. const Vec2 pos = out_uv * 2.0 - 1.0;
  11. gl_Position = Vec4(pos, 0.0, 1.0);
  12. }