Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #version 450 core
  2. out vec2 TexCoord;
  3.  
  4. void main()
  5. {
  6.     gl_Position.x = (float) (gl_VertexID / 2) * 4.0 -1.0;
  7.     gl_Position.y = (float) (gl_VertexID % 2) * 4.0 -1.0;
  8.     gl_Position.z = 0.0;
  9.     gl_Position.w = 1.0;
  10.    
  11.     TexCoord.x = (float)(gl_VertexID / 2) * 2.0;
  12.     TexCoord.y = 1.0 - (float)(gl_VertexID % 2) * 2.0;
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement