void main()
{
	gl_Position = ftransform();
	
	vec4 vecPositionEye = gl_ModelViewMatrix * gl_Vertex;	
	
	gl_TexCoord[0] = vec4(dot(gl_EyePlaneS[0],vecPositionEye),dot(gl_EyePlaneT[0],vecPositionEye),dot(gl_EyePlaneR[0],vecPositionEye),dot(gl_EyePlaneQ[0],vecPositionEye));	
	gl_TexCoord[1] = vec4(dot(gl_EyePlaneS[1],vecPositionEye),dot(gl_EyePlaneT[1],vecPositionEye),dot(gl_EyePlaneR[1],vecPositionEye),dot(gl_EyePlaneQ[1],vecPositionEye));	

	gl_TexCoord[2] = vec4(dot(gl_EyePlaneS[0],gl_LightSource[0].position),dot(gl_EyePlaneT[0],gl_LightSource[0].position),dot(gl_EyePlaneR[0],gl_LightSource[0].position),dot(gl_EyePlaneQ[0],gl_LightSource[0].position));
	gl_TexCoord[3] = vec4(dot(gl_EyePlaneS[0],gl_LightSource[0].halfVector),dot(gl_EyePlaneT[0],gl_LightSource[0].halfVector),dot(gl_EyePlaneR[0],gl_LightSource[0].halfVector),dot(gl_EyePlaneQ[0],gl_LightSource[0].halfVector));

	gl_TexCoord[4] = vec4(dot(gl_EyePlaneS[1],gl_LightSource[0].position),dot(gl_EyePlaneT[1],gl_LightSource[0].position),dot(gl_EyePlaneR[1],gl_LightSource[0].position),dot(gl_EyePlaneQ[1],gl_LightSource[0].position));
	gl_TexCoord[5] = vec4(dot(gl_EyePlaneS[1],gl_LightSource[0].halfVector),dot(gl_EyePlaneT[1],gl_LightSource[0].halfVector),dot(gl_EyePlaneR[1],gl_LightSource[0].halfVector),dot(gl_EyePlaneQ[1],gl_LightSource[0].halfVector));	
}