#version 330 core
layout (location = 0) in vec3 aPosition;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec2 aTextureCoordinate;

uniform mat4 modelView;
uniform mat3 normalModelView;
uniform mat4 projection;


out vec3 normal;
out vec3 fragmentPosition;
out vec2 textureCoordinate;
void main() {
	normal = normalModelView * aNormal;
	textureCoordinate = aTextureCoordinate;

	vec4 modelViewPos = modelView * vec4(aPosition, 1.0);

	gl_Position = projection * modelViewPos;
	
	fragmentPosition = vec3(modelViewPos);
}