/*=============================================================================
	VSMDepthGatherPixelShader.usf: Copies shadow map depth values for VSM
	Copyright © 2006 Epic Games, Inc. All Rights Reserved.
=============================================================================*/

#include "Common.usf"

sampler2D ShadowDepthTexture;

/** The entry point. */
void Main(
	in float2 UV : TEXCOORD0,
	out float4 OutColor : COLOR0
	)
{
	float M = texDepth2D(ShadowDepthTexture,UV).r;
	float MSq = M*M;
	OutColor = (float4(M,MSq,1,1) - 0.5) * 2;
}

