// Includes all post-process common data (textures & sampler)
#include "PPCommonData.fxh"


float3 LuminanceConv = { 0.3f, 0.59f, 0.11f };


//-----------------------------------------------------------------------------
// Pixel Shader: ColorMonochrome
// Desc: Performs post-processing effect that converts a colored image to grayscale
//-----------------------------------------------------------------------------
float4 ColorMonochrome(float2 Tex : TEXCOORD0) : COLOR0
{
    return dot((float3)tex2D(g_samSrcColor, Tex), LuminanceConv);
}


//-----------------------------------------------------------------------------
// Technique: PostProcess
// Desc: Performs post-processing effect that converts a colored image to grayscale
//-----------------------------------------------------------------------------
technique PostProcess
{
    pass p0
    {
		ZEnable = false;
		
        VertexShader = null;
        PixelShader = compile ps_2_0 ColorMonochrome();
    }
}
