Advertisement
Guest User

Untitled

a guest
Feb 20th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #version 450
  2.  
  3. out VS_OUT
  4. {
  5.     vec2 uv;
  6. } vs_out;
  7.  
  8. out gl_PerVertex
  9. {
  10.     vec4 gl_Position;
  11. };
  12.  
  13. const vec2 g_positions[6] =
  14. {
  15.     { -1, -1 },
  16.     { 1, -1 },
  17.     { 1, 1 },
  18.  
  19.     { 1, 1 },
  20.     { -1, 1 },
  21.     { -1, -1 }
  22. };
  23.  
  24. const vec2 g_uv[6] =
  25. {
  26.     { 0, 0 },
  27.     { 1, 0 },
  28.     { 1, 1 },
  29.  
  30.     { 1, 1 },
  31.     { 0, 1 },
  32.     { 0, 0 }
  33. };
  34.  
  35. void main()
  36. {
  37.     vs_out.uv = g_uv[gl_VertexIndex];
  38.     gl_Position = vec4(g_positions[gl_VertexIndex], 0, 1);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement