	
	varying vec3 normal,halfVector;


	uniform sampler2D Texture0,Texture1;

	
	void main()
	{


vec4 color=texture2D(Texture0 ,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     *=texture2D(Texture1 ,gl_TexCoord[1].st ).rgb;


color.rgb += pow(NdotHV, 30.0)*(0.8+color.g);


color.rgb += (0.8-n.b)*0.5;

gl_FragColor = color;
	}