varying vec4 ClrDiffuse;
varying vec2 TexCoord;
varying vec4 ViewCoords;
varying vec3 Normal, HalfVec; 

uniform vec3 Eng_LocalLighting;
uniform vec3 Eng_LocalCameraPos;

void main()
{
	TexCoord = gl_MultiTexCoord0.xy;
	Normal = gl_Normal;

	vec3 CameraDir = normalize(Eng_LocalCameraPos - gl_Vertex.xyz);
	HalfVec = CameraDir + Eng_LocalLighting;
		 
	ClrDiffuse = (max(0.0, dot(gl_Normal, Eng_LocalLighting)) * gl_LightSource[0].diffuse);
	 			 	
 	gl_Position = ftransform();
 	ViewCoords = gl_Position;
}