mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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 commit0efd4e5c29
. This reverts commitb4ec836aca
. This reverts commitbb4c9e2205
. This reverts commit146b02615c
.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user