texture g_texturea;
texture g_textureb;

sampler2D g_samSrcColor =
sampler_state
{
    Texture = <g_texturea>;
};

float BulletTime=1.0f;
float ScreenMoveX=0.0f;
float ScreenMoveY=0.0f;
float PixelSizeX=0.001f;
float PixelSizeY=0.001f;
float Alpha=1.0f;

float4 MyShader( float2 Tex : TEXCOORD0  ) : COLOR0
{

    float4 Color;
    float alpha;
    
 	Color = tex2D( g_samSrcColor, Tex );
 	
 	
 	if ( BulletTime < 1.0f )
 	{
 		Color.rgb = ( ( (Color.r + Color.g + Color.b ) / 3.0f ) * (1.0f-BulletTime)) + (Color.rgb * BulletTime);
		Color.gb -= (BulletTime - 1.0f) * 0.01f;
 	}
 	
 	Color.a = Alpha;	

    return Color;
}

technique PostProcess
{
    pass p0
    {
        VertexShader = null;
        PixelShader = compile ps_2_0 MyShader();
    }

}