//Author: peachykeen
//Desc: 
//	Enables a grayscale effect on the scene while in menus

sampler s0;// = sampler_state{ texture=<lastshader> };

bool pk_menu;

float4 menu_gray(in float2 Tex : TEXCOORD ) : COLOR0
{
     float4 color = tex2D(s0, Tex);
     if ( pk_menu )
     {
          color.rgb = (color.r*0.3) + (color.g*0.59) + (color.b*0.11);
		if ( Tex.x < 0.01 )
		{
			color.rgb = 1.0f;
		}
     }  else {
		if ( Tex.x < 0.01 )
		{
			color.r = 1.0f;
			color.gb = 0.0f;
		}
	}
     return color;
}

Technique T0
{
     Pass P0
     {
           PixelShader = compile ps_2_0 menu_gray();
     }
}
