float4 ambient;
float4 diffuse;
sampler diffuseMap;
float4 lightDir;

float4 main(float3 normal : TEXCOORD0,float2 texCoord : TEXCOORD1 ) : COLOR
{
   float4 DiffuseColor = diffuse * max(0,dot(normal,-lightDir));
   return (ambient + DiffuseColor*(2-diffuse.a)) * tex2D(diffuseMap,texCoord);
}