#version 330 core

uniform mat4 modelMatrix = mat4(1);
uniform mat4 viewMatrix = mat4(1);
uniform mat4 projectionMatrix = mat4(1);
uniform mat3 normalMatrix = mat3(1);

layout(location=0)in vec3 vertex;
layout(location=1)in vec2 texCoord;
layout(location=2)in vec4 color;
layout(location=3)in vec3 normal;

out struct
{
	vec2 texCoord;
	vec4 color;
	vec3 normal;
}fInfo;

void main()
{
	fInfo.color = color;
	fInfo.texCoord = texCoord;
    fInfo.normal = normalize(normalMatrix*normal);
	gl_Position = projectionMatrix*viewMatrix*modelMatrix*vec4(vertex, 1);
}