// GL Shading Language version 1.0 Fragment Shader
//  Orion Sky Lawlor, olawlor@acm.org, 2006/08/31 (Public Domain)

// Vertex/fragment shader interface
varying vec4 color; // Material diffuse color
varying vec3 position; // World-space coordinates of object
varying vec3 normal; // Surface normal

// Input: from vertex.txt.  Output: gl_FragColor.
void main(void)
{
	vec3 N=normalize(normal); // Points away from surface
	vec3 L1=vec3(0,1,0); // Points toward light
	
	gl_FragColor=color*vec4(vec3(dot(N,L1)),1.0);
}
