Created
March 2, 2015 19:22
-
-
Save feliwir/c70fd440401ddf36d9ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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.0f); | |
// The color of each vertex will be interpolated | |
// to produce the color of each fragment | |
fragmentColor = color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment