#version 410 layout (location=0) in vec3 VertexPosition; layout (location=1) in vec3 VertexNormal; layout (location=2) in vec2 VertexTexCoord; out vec3 VPosition; out vec3 VNormal; uniform mat4 MVP; uniform mat4 ViewMatrix; uniform mat4 ModelViewMatrix; void main() { vec4 n4 = ModelViewMatrix*vec4(VertexNormal, 0.0); vec4 v4 = ModelViewMatrix*vec4(VertexPosition, 1.0); VNormal = vec3(n4); VPosition = vec3(v4); gl_Position = MVP * vec4(VertexPosition, 1.0); }