Advertisement
Guest User

Untitled

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