sampler2D Tex0; sampler2D DS; struct PS_INPUT{ float2 Tex : TEXCOORD0; float4 Depth : TEXCOORD1; float2 Pos : VPOS; }; struct PS_OUTPUT{ float4 Color0 : COLOR0; float4 Color1 : COLOR1; }; float2 InvRes; PS_OUTPUT main(const PS_INPUT Input){ float Depth = tex2D(DS, (Input.Pos + 0.5f) * InvRes); if ((Input.Depth.z / Input.Depth.w) > Depth){ clip(-1); } float4 Tex = tex2D(Tex0, Input.Tex); PS_OUTPUT Out; Out.Color0 = tex2D(Tex0, Input.Tex) * 0.3f; Out.Color1 = tex2D(Tex0, Input.Tex) * 0.7; return Out; }