From d94fedc61efd7e5fb31fb90001b8eab570b6d41d Mon Sep 17 00:00:00 2001 From: Leonardo Date: Thu, 14 Oct 2021 14:02:47 +0200 Subject: [PATCH] Changed the Far fog on fancy. Now fog start after the real game render distance --- src/main/java/com/seibel/lod/render/LodRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/seibel/lod/render/LodRenderer.java b/src/main/java/com/seibel/lod/render/LodRenderer.java index 619bdaeb5..4d4655a7b 100644 --- a/src/main/java/com/seibel/lod/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/render/LodRenderer.java @@ -130,6 +130,7 @@ public class LodRenderer */ public boolean[][] vanillaRenderedChunks; public boolean vanillaRenderedChunksChanged; + public int vanillaBlockRenderedDistance; @@ -242,7 +243,7 @@ public class LodRenderer mcProjectionMatrix.transpose(); Matrix4f modelViewMatrix = offsetTheModelViewMatrix(mcMatrixStack, partialTicks); - + vanillaBlockRenderedDistance = mc.getRenderDistance() * LodUtil.CHUNK_WIDTH; // required for setupFog and setupProjectionMatrix if (mc.getClientWorld().dimensionType().hasCeiling()) farPlaneBlockDistance = Math.min(LodConfig.CLIENT.graphics.lodChunkRenderDistance.get(), LodUtil.CEILED_DIMENSION_MAX_RENDER_DISTANCE) * LodUtil.CHUNK_WIDTH; @@ -402,7 +403,7 @@ public class LodRenderer if (LodConfig.CLIENT.graphics.fogDistance.get() == FogDistance.NEAR_AND_FAR) RenderSystem.fogStart(farPlaneBlockDistance * 0.9f); else - RenderSystem.fogStart(farPlaneBlockDistance * 0.1f); + RenderSystem.fogStart(Math.min(vanillaBlockRenderedDistance * 1.5f, farPlaneBlockDistance * 0.9f)); RenderSystem.fogEnd(farPlaneBlockDistance * 1.0f); } else if (fogQuality == FogQuality.FAST)