#version 330 core

!include types.glsl

layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;

uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;

out VS_OUT {
	vec3 fragmentPosition;
	vec2 textureCoordinate;
	vec3 normal;
} vs_out;

void main() {
	gl_Position = projection * view * model * vec4(position, 1.0);

	vs_out.fragmentPosition = vec3(model * vec4(position, 1.0));
	vs_out.textureCoordinate = texCoord;
	vs_out.normal = mat3(transpose(inverse(model))) * normal;
}
