#version 330 core

uniform mat4 mWorld;
uniform mat4 mView;
uniform mat4 mProjection;
uniform vec3 vEye;

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

out float zPos;
out vec3 norm;

void main () {
    norm = -normalize(vec3(mProjection*mView*mWorld*vec4(normal, 0)));
    zPos = position.z;
	gl_Position = mProjection*mView*mWorld*vec4(position, 1.0);
}
