sampler samp0_ : register(s0);

struct PS_INPUT {
	float4 diffuse 	: COLOR0;
	float2 texCoord : TEXCOORD0;
};

float4 mainPS(PS_INPUT inPs) : COLOR0 {
	float4 texColor = tex2D(samp0_, inPs.texCoord);

	if(texColor.a > 0){
		float c = (texColor.r + texColor.g + texColor.b) / 3.000f;

		texColor.r = c;
		texColor.g = c;
		texColor.b = c;
	}

	return (texColor * inPs.diffuse);
}

technique Render {
	pass P0 {
		PixelShader = compile ps_2_0 mainPS();
	}
}

