
	varying vec3 normal,halfVector;


	uniform sampler2D Texture0,Texture1,Texture2,Texture3;

	
	void main()
	{


vec4 color =texture2D(Texture0 ,gl_TexCoord[0].st).rgba;
vec4 color2=texture2D(Texture2 ,gl_TexCoord[0].st).rgba;




		vec3 n,halfV;
		float NdotL,NdotHV;
		n = normalize(normal);

			halfV = normalize(halfVector);
			NdotHV = max(dot(n,halfV),0.0);




color.rgb += pow(NdotHV, 8.0)*0.2;


color.rgb *= texture2D(Texture1 ,gl_TexCoord[1].st).rgb;
color.rgb += (0.8-n.b)*0.3*color2.g;
color.rgb  += texture2D(Texture3 ,gl_TexCoord[2].st).rgb*color2.r;



gl_FragColor = color;
	}