#version 300 es

in vec3 position;
in vec3 normal;

uniform mat4 projMtx;
uniform mat4 viewMtx;
uniform mat4 mdlMtx;

out vec3 vWorldPos;
out vec3 vWorldNormal;

void main()
{
    gl_Position = projMtx * (viewMtx * (mdlMtx * vec4(position, 1.0))); 
    vWorldPos = (mdlMtx * vec4(position.xyz, 1.0)).xyz;

    // Only rotate the rest of these! 
    vWorldNormal = (mdlMtx * vec4(normal.xyz, 0.0)).xyz;
}

