sampler2D Tex0;

float3 Half;
float3 FogColor;

struct PS_INPUT{
	float4 Diff				: COLOR0;
	float3 DirtIntensity	: COLOR1;

	float2 BaseTex			: TEXCOORD0;
};

struct PS_OUTPUT{
    float4 Color			: COLOR;
};


PS_OUTPUT main(const PS_INPUT Input){
	// Texturing
	float4 BaseTexColor = tex2D(Tex0, Input.BaseTex);

	float3 TexColor = Input.Diff;
	TexColor *= BaseTexColor;

	TexColor = lerp(BaseTexColor, TexColor, BaseTexColor.a);
	TexColor += FogColor * Input.DirtIntensity.x;
		
	PS_OUTPUT Out;
	Out.Color.rgb = TexColor;
	Out.Color.a = Input.Diff.a;
	return Out;
}
