GS-hw: Don't write clamped depth test value to depth buffer when ZMSK is enabled.

Fixes missing shadows in Kingdom Hearts: Chain of Memories.
This commit is contained in:
lightningterror 2021-10-01 01:22:37 +02:00
parent 6ff46a795f
commit e0caacfa6f
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ void GSRendererDX11::EmulateZbuffer()
{
vs_cb.MaxDepth = GSVector2i(max_z);
}
else
else if (!m_context->ZBUF.ZMSK)
{
ps_cb.Af_MaxDepth.y = max_z * ldexpf(1, -32);
m_ps_sel.zclamp = 1;

View File

@ -146,7 +146,7 @@ void GSRendererOGL::EmulateZbuffer()
{
vs_cb.MaxDepth = GSVector2i(max_z);
}
else
else if (!m_context->ZBUF.ZMSK)
{
ps_cb.MaxDepth = GSVector4(0.0f, 0.0f, 0.0f, max_z * ldexpf(1, -32));
m_ps_sel.zclamp = 1;