#version 330

#header uniforms

layout(location=0) in vec3 in_Position;
layout(location=1) in vec3 in_Normal;

out vec3 vs_out_Normal;
out float vs_out_Light;

void main()
{
	gl_Position = mWorldViewProjection*vec4(in_Position, 1);
	vs_out_Normal = in_Normal;
	vs_out_Light = 0.5f+0.5f*dot(vec3(0.57735, 0.57735, 0.57735), in_Normal);
	
	// Fog
//	vs_out_Light *= 1.0-min(max(length(in_Position)/50.0-0.7,0.0)/0.7,1.0);
}