varying vec3 normal, lightDir, halfVector;
varying vec4 ambient_color, diffuse_color, specular_color;

void main()
{	
	normal = gl_NormalMatrix * gl_Normal;

	vec3 vVertex = vec3(gl_ModelViewMatrix * gl_Vertex);

	lightDir = vec3(gl_LightSource[0].position.xyz - vVertex);
	halfVector = normalize(gl_LightSource[0].halfVector.xyz);
	
	ambient_color = (gl_FrontLightModelProduct.sceneColor * gl_FrontMaterial.ambient) + 
    (gl_LightSource[0].ambient * gl_FrontMaterial.ambient);
		
	diffuse_color = gl_LightSource[0].diffuse * gl_FrontMaterial.diffuse;
	
	specular_color = gl_LightSource[0].specular * gl_FrontMaterial.specular;

	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_Position = ftransform();		
}
