varying vec3 normal, lightDir, eyeVec;
varying float att;

void main()
{	
	vec3 vVertex = vec3(gl_ModelViewMatrix * gl_Vertex);
	lightDir = vec3(gl_LightSource[0].position.xyz - vVertex);
	eyeVec = -vVertex;

	normal = gl_NormalMatrix * gl_Normal;
	
	float d = length(lightDir);
	
	att = 1.0 / ( gl_LightSource[0].constantAttenuation + (gl_LightSource[0].linearAttenuation*d) + (gl_LightSource[0].quadraticAttenuation*d*d) );

	gl_TexCoord[0] = gl_MultiTexCoord0;

	gl_Position = ftransform();	

	gl_FrontColor = gl_Color;
}