
// ------- UNIFORMS (SHADER CONSTS) -------
Texture2D		hu_sSceneTexture0;
SamplerState	SampleType0;
float			u_fInterpolation;
float			u_fColorDecreased;

// ------- INTERPOLATORS (SHADER INPUTS) -------
struct PIn
{
    vec4	position: SV_POSITION;
	vec2	uv: TEXCOORD;
};

// ------- FUNCTIONS ------- 
vec4 main(PIn input): SV_TARGET
{
	vec4 vTexture = hu_sSceneTexture0.Sample(SampleType0, input.uv);
	vec3 vTextureRGB = vTexture.rgb;
	float fGray = dot(vTextureRGB, vec3(0.3, 0.59, 0.11));
	vTextureRGB.rgb = lerp(vTextureRGB, dot(vec3(fGray, fGray, fGray), vec3(0.3, 0.59, 0.11)), u_fInterpolation);
	
	float fColorDecrease = u_fColorDecreased*u_fInterpolation;
	vTextureRGB.rgb -= vec3(fColorDecrease, fColorDecrease, fColorDecrease);

	return vec4(vTextureRGB, vTexture.a);
}
