From 3fbe1b1ccdcfc0a2ea652e0860f0795362d2c962 Mon Sep 17 00:00:00 2001 From: degasus Date: Sun, 13 Oct 2013 16:14:30 +0200 Subject: [PATCH] VideoCommon: Update FastDepth's comment --- Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index e4d2bc569f..41b0136cfe 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -609,11 +609,11 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T if (Pretest == AlphaTest::UNDETERMINED || (Pretest == AlphaTest::FAIL && bpmem.UseLateDepthTest())) WriteAlphaTest(out, uid_data, ApiType, dstAlphaMode, per_pixel_depth); - - // TODO: Make more sense out of this comment - // D3D9 doesn't support readback of depth in pixel shader, so we always have to calculate it again. - // This shouldn't be a performance issue as the written depth is usually still from perspective division - // but this isn't true for z-textures, so there will be depth issues between enabled and disabled z-textures fragments + // FastDepth means to trust the depth generated in perspective division. + // It should be correct, but it seems not to be as accurate as required. TODO: Find out why + // So for disabled FastDepth, just calucate the depth value again. + // This performance lack of this division doesn't matter, but it's a major performance issue + // because of its forced off earlyZ. if (g_ActiveConfig.bFastDepthCalc) out.Write("float zCoord = rawpos.z;\n"); else