From a012cead98687d60b0fad2b729751ba78b3a5c29 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Mon, 8 Sep 2025 11:00:07 +1000 Subject: [PATCH] silly --- .../cortex/voxy/client/core/VoxyRenderSystem.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/cortex/voxy/client/core/VoxyRenderSystem.java b/src/main/java/me/cortex/voxy/client/core/VoxyRenderSystem.java index bad3eab8..76005aca 100644 --- a/src/main/java/me/cortex/voxy/client/core/VoxyRenderSystem.java +++ b/src/main/java/me/cortex/voxy/client/core/VoxyRenderSystem.java @@ -319,15 +319,18 @@ public class VoxyRenderSystem { private void autoBalanceSubDivSize() { //only increase quality while there are very few mesh queues, this stops, // e.g. while flying and is rendering alot of low quality chunks - boolean canDecreaseSize = this.renderGen.getTaskCount() < 5000; - float CHANGE_PER_SECOND = 30; + boolean canDecreaseSize = this.renderGen.getTaskCount() < 300; + int MIN_FPS = 55; + int MAX_FPS = 65; + float INCREASE_PER_SECOND = 60; + float DECREASE_PER_SECOND = 30; //Auto fps targeting - if (MinecraftClient.getInstance().getCurrentFps() < 45) { - VoxyConfig.CONFIG.subDivisionSize = Math.min(VoxyConfig.CONFIG.subDivisionSize + CHANGE_PER_SECOND / Math.max(1f, MinecraftClient.getInstance().getCurrentFps()), 256); + if (MinecraftClient.getInstance().getCurrentFps() < MIN_FPS) { + VoxyConfig.CONFIG.subDivisionSize = Math.min(VoxyConfig.CONFIG.subDivisionSize + INCREASE_PER_SECOND / Math.max(1f, MinecraftClient.getInstance().getCurrentFps()), 256); } - if (55 < MinecraftClient.getInstance().getCurrentFps() && canDecreaseSize) { - VoxyConfig.CONFIG.subDivisionSize = Math.max(VoxyConfig.CONFIG.subDivisionSize - CHANGE_PER_SECOND / Math.max(1f, MinecraftClient.getInstance().getCurrentFps()), 30); + if (MAX_FPS < MinecraftClient.getInstance().getCurrentFps() && canDecreaseSize) { + VoxyConfig.CONFIG.subDivisionSize = Math.max(VoxyConfig.CONFIG.subDivisionSize - DECREASE_PER_SECOND / Math.max(1f, MinecraftClient.getInstance().getCurrentFps()), 28); } }