VERTEX

void main()
{
	vec3 normal;
	
	gl_Position=ftransform(); 

	
	normal = normalize(gl_NormalMatrix * gl_Normal);
	float d = max( dot(normal, normalize(vec3(-0.5,0.7,1))) ,0.0);
	gl_FrontColor =  (gl_Color *d) +vec4(0.1,0,0.2,0) ;
	

	vec4 lightDir;
	float NdotL;
	
	lightDir = gl_ModelViewMatrix * gl_Vertex ;
	lightDir.z-=10.0;
	lightDir = -normalize(lightDir);
	NdotL = max(dot(normal, vec3(lightDir.x,lightDir.y,lightDir.z)), 0.0);
	float f = max(0.5 - (NdotL * gl_FrontMaterial.specular.g ),0.0);
	gl_FrontColor += vec4(f,f,f,0.0);

}
PIXEL

void main()
{
	gl_FragColor =  gl_Color ;
}
