
// tex_0 must be a depth buffer by setting SubresourceType to 1 in PostEffect_GiveInputSurface.
// The result is a grayscale representing the camera space depth from the given depth buffer.

float4 PS( VS_to_PS input) : SV_Target {
	return ZWCorrection[0].y / (tex_0.Sample( samClampedLinear, PixelPos / Dimensions ).xxxx - ZWCorrection[0].x);
}
