From d9fabf6347c807d806ecad5abf2972fbab8c410c Mon Sep 17 00:00:00 2001 From: rogerman Date: Thu, 9 Sep 2021 13:34:47 -0700 Subject: [PATCH] GFX3D: So apparently, GBATEK says that, instead of clamping the FogShiftSHR value to 10, the FogShiftSHR value should reset to 0 if it goes above 10. Hmm, okay. --- desmume/src/gfx3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index bccb09acc..d6166372b 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -3093,7 +3093,7 @@ void gfx3d_parseCurrentDISP3DCNT() gfx3d.state.enableEdgeMarking = (DISP3DCNT.EnableEdgeMarking != 0); gfx3d.state.enableFogAlphaOnly = (DISP3DCNT.FogOnlyAlpha != 0); gfx3d.state.enableFog = (DISP3DCNT.EnableFog != 0); - gfx3d.state.fogShift = (DISP3DCNT.FogShiftSHR <= 10) ? DISP3DCNT.FogShiftSHR : 10; + gfx3d.state.fogShift = (DISP3DCNT.FogShiftSHR <= 10) ? DISP3DCNT.FogShiftSHR : 0; // According to GBATEK, values higher than 10 are reset to 0. gfx3d.state.enableClearImage = (DISP3DCNT.RearPlaneMode != 0); }