Advertisement
Guest User

Untitled

a guest
Jan 30th, 2012
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #version 150 core
  2.  
  3. // Input vertex data, different for all executions of this shader.
  4. layout(location = 0) in vec3 vertexPosition_modelspace;
  5. layout(location = 1) in vec2 vertexUV;
  6.  
  7. // Output data ; will be interpolated for each fragment.
  8. out vec2 UV;
  9.  
  10. // Values that stay constant for the whole mesh.
  11. uniform mat4 VP;
  12. uniform mat4 Model;
  13.  
  14. void main(){
  15.  
  16. // Output position of the vertex, in clip space : MVP * position
  17. gl_Position = VP * Model * vec4(vertexPosition_modelspace,1);
  18.  
  19. // UV of the vertex. No special space for this one.
  20. UV = vertexUV;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement