mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 03:00:14 +02:00
Don't write depth while the Z compare is off
On the hardware (and in Dolphin) GXSetZMode with the compare disabled leaves the Z buffer alone even when the update bit is set. Aurora still wrote depth, so a full-screen quad drawn that way (the darkening during Stormship's lightning, for one) marked the whole screen nearest and every depth-tested draw after it failed until it faded. Ported from BlackAndBlue95/Strikers-WiiCompiled 369ec992. The pipeline cache key already includes depthUpdate, so no cache version bump. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NKSMYZU43wUfYtm1sxGsC
This commit is contained in:
1 file changed
+2
-1
@@ -1910,7 +1910,8 @@ void populate_pipeline_config(PipelineConfig& config, GXPrimitive primitive, GXV
|
|||||||
config.pixelFmt = g_gxState.pixelFmt;
|
config.pixelFmt = g_gxState.pixelFmt;
|
||||||
config.dstAlpha = effective_dst_alpha(g_gxState.pixelFmt, g_gxState.alphaUpdate, g_gxState.dstAlpha);
|
config.dstAlpha = effective_dst_alpha(g_gxState.pixelFmt, g_gxState.alphaUpdate, g_gxState.dstAlpha);
|
||||||
config.depthCompare = g_gxState.depthCompare;
|
config.depthCompare = g_gxState.depthCompare;
|
||||||
config.depthUpdate = g_gxState.depthUpdate;
|
// As on the hardware (and in Dolphin): with the Z compare off, the Z buffer isn't updated either.
|
||||||
|
config.depthUpdate = g_gxState.depthCompare && g_gxState.depthUpdate;
|
||||||
config.alphaUpdate = effective_alpha_update(g_gxState.pixelFmt, g_gxState.alphaUpdate);
|
config.alphaUpdate = effective_alpha_update(g_gxState.pixelFmt, g_gxState.alphaUpdate);
|
||||||
config.colorUpdate = g_gxState.colorUpdate;
|
config.colorUpdate = g_gxState.colorUpdate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user