sampler2D sourceTexture : register(s0);

float3 gTint = float3(1.0, 1.0, 1.0);
float gStrength = 0.0;

float4 main(float2 textureCoordinate : TEXCOORD0) : COLOR0
{
    float4 sourceColor = tex2D(sourceTexture, textureCoordinate);
    float luminance = dot(sourceColor.rgb, float3(0.299, 0.587, 0.114));
    float3 colorized = saturate(luminance * gTint * 1.65);

    return float4(lerp(sourceColor.rgb, colorized, gStrength), sourceColor.a);
}

technique SeasonalTint
{
    pass P0
    {
        PixelShader = compile ps_2_0 main();
    }
}

technique Fallback
{
    pass P0
    {
    }
}
