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

float DepthScaler = 0.33f;

//-----------------------------------------------------------------------------
// Pixel Shader: DisplayPosition
// Desc: Performs post-processing effect that output the position as the pixel's
//       color.
//-----------------------------------------------------------------------------
float4 DisplayPosition(float2 Tex : TEXCOORD0) : COLOR0
{
    return float4( tex2D(g_samScenePosition, Tex).zzz*DepthScaler, 1.0f );
}


//-----------------------------------------------------------------------------
// Technique: PostProcess
// Desc: Performs post-processing effect.
//-----------------------------------------------------------------------------
technique PostProcess
<
	string Parameter0 = "DepthScaler";
	string Parameter0Desc = "(float)";
	int Parameter0Size = 1;
	float Parameter0Def = 0.33f;
>
{
    pass p0
    {
		ZEnable = false;
		
		VertexShader = null;
		PixelShader = compile ps_2_0 DisplayPosition();
    }
}
