mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Correct condition for uEnableDepth uniform.
Fixed depth compare for particles in Indiana Jones when N64 depth compare enabled, #1977
This commit is contained in:
parent
6de128b8fd
commit
f787483dbb
|
@ -611,15 +611,15 @@ public:
|
||||||
if (pBuffer == nullptr || pBuffer->m_pDepthBuffer == nullptr)
|
if (pBuffer == nullptr || pBuffer->m_pDepthBuffer == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int nDepthEnabled = (gSP.geometryMode & G_ZBUFFER) > 0 ? 1 : 0;
|
const bool nDepthEnabled = ((gSP.geometryMode & G_ZBUFFER) || gDP.otherMode.depthSource == G_ZS_PRIM) &&
|
||||||
uEnableDepth.set(nDepthEnabled, _force);
|
gDP.otherMode.cycleType <= G_CYC_2CYCLE;
|
||||||
if (nDepthEnabled == 0) {
|
uEnableDepth.set(nDepthEnabled ? 1 : 0, _force);
|
||||||
uEnableDepthCompare.set(0, _force);
|
if (nDepthEnabled) {
|
||||||
uEnableDepthUpdate.set(0, _force);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
uEnableDepthCompare.set(gDP.otherMode.depthCompare, _force);
|
uEnableDepthCompare.set(gDP.otherMode.depthCompare, _force);
|
||||||
uEnableDepthUpdate.set(gDP.otherMode.depthUpdate, _force);
|
uEnableDepthUpdate.set(gDP.otherMode.depthUpdate, _force);
|
||||||
|
} else {
|
||||||
|
uEnableDepthCompare.set(0, _force);
|
||||||
|
uEnableDepthUpdate.set(0, _force);
|
||||||
}
|
}
|
||||||
uDepthMode.set(gDP.otherMode.depthMode, _force);
|
uDepthMode.set(gDP.otherMode.depthMode, _force);
|
||||||
uDepthSource.set(gDP.otherMode.depthSource, _force);
|
uDepthSource.set(gDP.otherMode.depthSource, _force);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user