mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-18 23:59:32 +00:00
GSdx: Fix Alpha test value initialization
Alpha test should only be disabled when writes to all of the alpha bits in the Framebuffer are masked. Fixes a regression in Dragon Ball Z: Budokai 3 scouter image rendering.
This commit is contained in:
parent
7d3c850813
commit
f423cf73c4
@ -607,12 +607,14 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
|
||||
default: __assume(0);
|
||||
}
|
||||
|
||||
// Depth test should be disabled when depth writes are masked and similarly, Alpha test must be disabled
|
||||
// when writes to all of the alpha bits in the Framebuffer are masked.
|
||||
if (ate_RGBA_then_Z) {
|
||||
z = !m_context->ZBUF.ZMSK;
|
||||
r = g = b = a = false;
|
||||
} else if (ate_RGB_then_ZA) {
|
||||
z = !m_context->ZBUF.ZMSK;
|
||||
a = !!(m_context->FRAME.FBMSK & 0xFF000000);
|
||||
a = (m_context->FRAME.FBMSK & 0xFF000000) != 0xFF000000;
|
||||
r = g = b = false;
|
||||
}
|
||||
|
||||
|
@ -1585,12 +1585,14 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||
default: __assume(0);
|
||||
}
|
||||
|
||||
// Depth test should be disabled when depth writes are masked and similarly, Alpha test must be disabled
|
||||
// when writes to all of the alpha bits in the Framebuffer are masked.
|
||||
if (ate_RGBA_then_Z) {
|
||||
z = !m_context->ZBUF.ZMSK;
|
||||
r = g = b = a = false;
|
||||
} else if (ate_RGB_then_ZA) {
|
||||
z = !m_context->ZBUF.ZMSK;
|
||||
a = !!(m_context->FRAME.FBMSK & 0xFF000000);
|
||||
a = (m_context->FRAME.FBMSK & 0xFF000000) != 0xFF000000;
|
||||
r = g = b = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user