#version 330 core
// Positions/Coordinates
layout (location = 0) in vec3 vertex_position;
// Colors
layout (location = 1) in vec3 vertex_color;
// Texture Coordinates
layout (location = 2) in vec2 vertex_texcoord;
// Normals (not necessarily normalized)
layout (location = 3) in vec3 vertex_normal;

out vec2 TexCoords;
out vec3 WorldPos;  //vs_position
out vec3 Normal;

uniform mat4 ProjectionMatrix;
uniform mat4 ViewMatrix;
uniform mat4 ModelMatrix;
uniform mat3 normalMatrix;

void main()
{
    TexCoords = vertex_texcoord;
    WorldPos = vec3(ModelMatrix * vec4(vertex_position, 1.0));
    Normal = normalMatrix * vertex_normal;   

    gl_Position =  ProjectionMatrix * ViewMatrix * vec4(WorldPos, 1.0);
}