sampler texture0 : register(s0);
float4 diffuse;
float4 FogColor;

struct PS_INPUT
{
  float2 uv0 :TEXCOORD0;
  float fog: TEXCOORD1;
};

float4 main (PS_INPUT input): COLOR0
{
  float4 tex=tex2D(texture0, input.uv0);
  float3 colorp=tex.xyz*diffuse.xyz;
  return float4(float3(colorp.xyz*(1-input.fog) + FogColor.xyz*input.fog).xyz,diffuse.a*tex.a);
}
