#version 330 core layout(location = 0) in vec3 aPos; layout(location = 1) in vec2 aUV; layout(location = 2) in vec3 aNormal; uniform mat4 model; uniform mat4 view; uniform mat4 proj; uniform mat4 lightSpace; out vec2 vUV; out vec3 vNormal; out vec3 vFragPos; out vec4 vFragPosLightSpace; void main() { vUV = aUV; vFragPos = vec3(model * vec4(aPos, 1.0)); vNormal = mat3(transpose(inverse(model))) * aNormal; vFragPosLightSpace = lightSpace * vec4(vFragPos, 1.0); gl_Position = proj * view * model * vec4(aPos, 1.0); }