summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@gmail.com>2012-08-10 18:57:37 +0200
committerNeoBrainX <NeoBrainX@gmail.com>2012-08-10 20:12:02 +0200
commit08a9c660371202cfd8976ee60191a6f42445c1a9 (patch)
tree6927d917bc9a660522fc253bd6dd39a67ffcc1fe /Source/Core/VideoCommon/Src/PixelShaderManager.cpp
parent6e02ad55bc228ca2af9a695dc404f64765b7472a (diff)
Revert the recent zcomploc changes including the Graphic_Fixes merge.
Reason: - It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance. - It provides virtually no advantages over the previous hack while introducing lots of code. - There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc. This reverts commit 0efd4e5c29766ba5f5d22204339637ade9ccec83. This reverts commit b4ec836aca4392a86b864dc58b1030ca616fe0d5. This reverts commit bb4c9e2205d4117f48fd4ca50774ee56c28c92e4. This reverts commit 146b02615c07dd52dddaa18b7e23d09bc23b549e.
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderManager.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
index 52468d0262..1533f9348e 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
@@ -466,39 +466,6 @@ void PixelShaderManager::SetMaterialColorChanged(int index)
nMaterialsChanged |= (1 << index);
}
-ALPHA_PRETEST_RESULT PixelShaderManager::AlphaPreTest()
-{
- u32 op = bpmem.alphaFunc.logic;
- u32 comp[2] = {bpmem.alphaFunc.comp0, bpmem.alphaFunc.comp1};
-
- // First kill all the simple cases
- switch(op)
- {
- case 0: // AND
- if (comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS) return ALPHAPT_ALWAYSPASS;
- if (comp[0] == ALPHACMP_NEVER || comp[1] == ALPHACMP_NEVER) return ALPHAPT_ALWAYSFAIL;
- break;
- case 1: // OR
- if (comp[0] == ALPHACMP_ALWAYS || comp[1] == ALPHACMP_ALWAYS) return ALPHAPT_ALWAYSPASS;
- if (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER)return ALPHAPT_ALWAYSFAIL;
- break;
- case 2: // XOR
- if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_NEVER) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_ALWAYS))
- return ALPHAPT_ALWAYSPASS;
- if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER))
- return ALPHAPT_ALWAYSFAIL;
- break;
- case 3: // XNOR
- if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_NEVER) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_ALWAYS))
- return ALPHAPT_ALWAYSFAIL;
- if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER))
- return ALPHAPT_ALWAYSPASS;
- break;
- default: PanicAlert("bad logic for alpha test? %08x", op);
- }
- return ALPHAPT_UNDEFINED;
-}
-
void PixelShaderManager::DoState(PointerWrap &p)
{
p.Do(lastRGBAfull);