Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 330 core
- layout(location = 0) in vec3 pos;
- layout(location = 1) in vec3 color;
- out vec3 fragmentColor;
- // Values that stay constant for the whole mesh.
- uniform mat4 MVP;
- void main()
- {
- // Output position of the vertex, in clip space : MVP * position
- gl_Position = MVP * vec4(pos,1);
- // The color of each vertex will be interpolated
- // to produce the color of each fragment
- fragmentColor = color;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement