#version 400

in vec4 esNormal;
in vec4 esPosition;

out vec4 result;

// This is the actual code that is executed.
void main( void )
{
	vec3 toEye = -normalize(esPosition.xyz);
	result = vec4( abs( dot( toEye, normalize( esNormal.xyz ))) );
}