Advertisement
Guest User

Untitled

a guest
Apr 20th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #version 330 core
  2.  
  3. layout(location = 0) in vec3 pos;
  4. layout(location = 1) in vec3 color;
  5.  
  6. out vec3 fragmentColor;
  7. // Values that stay constant for the whole mesh.
  8. uniform mat4 MVP;
  9.  
  10. void main()
  11. {
  12. // Output position of the vertex, in clip space : MVP * position
  13. gl_Position = MVP * vec4(pos,1);
  14.  
  15. // The color of each vertex will be interpolated
  16. // to produce the color of each fragment
  17. fragmentColor = color;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement