Fix underwater fog rendering

This commit is contained in:
James Seibel
2026-06-06 09:12:08 -05:00
parent 28a8bc39f2
commit a4e2003e0e
@@ -62,7 +62,10 @@ public class FogRenderParamFactory
{ {
// hide everything behind fog // hide everything behind fog
farFogStart = 0.0f; farFogStart = 0.0f;
farFogEnd = 0.0f; farFogEnd = 1.0f;
farFogMin = 1.0f; // minimum fog thickness is 1 so everything renders in fog
farFogMax = 1.0f;
farFogDensity = 1.0f; // always render max density
} }
DhApiFogRenderParam fogRenderParam = new DhApiFogRenderParam( DhApiFogRenderParam fogRenderParam = new DhApiFogRenderParam(
@@ -91,7 +94,9 @@ public class FogRenderParamFactory
{ {
Color fogColor; Color fogColor;
if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EDhApiFogColorMode.USE_SKY_COLOR) if (Config.Client.Advanced.Graphics.Fog.colorMode.get() == EDhApiFogColorMode.USE_SKY_COLOR
// when underwater or special fogs are being used, don't use the sky color
&& !MC_RENDER.isFogStateSpecial())
{ {
fogColor = MC_RENDER.getSkyColor(); fogColor = MC_RENDER.getSkyColor();
} }