#version 330 core
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec2 vertexUV;
layout(location = 2) in vec3 vertexNorm;

uniform mat4 MVP;
uniform mat4 MV;
uniform mat4 M;

out vec2 UV;
out vec3 Normal_View;
out vec3 Position_World;

void main()
{
	gl_Position = MVP * vec4(vertexPosition_modelspace, 1);
	Normal_View = (M * vec4(vertexNorm, 0.0)).xyz;
	Position_World = (M * vec4(vertexPosition_modelspace, 1)).xyz;
	UV = vertexUV;
}