diff --git a/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java b/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java index 219c236ee..56c1b1f01 100644 --- a/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java +++ b/src/main/java/com/seibel/lod/core/util/DetailDistanceUtil.java @@ -39,7 +39,9 @@ public class DetailDistanceUtil private static final double treeGenMultiplier = 1.0; private static final double treeCutMultiplier = 1.0; private static byte minGenDetail = CONFIG.client().graphics().quality().getDrawResolution().detailLevel; - private static byte minDrawDetail = (byte) Math.max(CONFIG.client().graphics().quality().getDrawResolution().detailLevel, CONFIG.client().graphics().quality().getDrawResolution().detailLevel); + private static byte minDrawDetail = (byte) Math.max(CONFIG.client().graphics().quality().getDrawResolution().detailLevel, CONFIG.client().graphics().quality().getDrawResolutionOffset()); + private static final int minGenDetailOffset = CONFIG.client().graphics().quality().getDrawResolutionOffset(); + private static final int minDrawDetailOffset = CONFIG.client().graphics().quality().getDrawResolutionOffset(); private static final int maxDetail = LodUtil.REGION_DETAIL_LEVEL + 1; private static final int minDistance = 0; private static int minDetailDistance = (int) (MC_RENDER.getRenderDistance()*16 * 1.42f); @@ -141,6 +143,10 @@ public class DetailDistanceUtil public static byte getLodDrawDetail(int detail) { + detail += minDrawDetailOffset; + if (detail > 10) + detail = 10; + if (detail < minDrawDetail) return minDrawDetail; else diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java index 1b370d38f..1715196cc 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java @@ -76,6 +76,7 @@ public interface ILodConfigWrapperSingleton HorizontalResolution DRAW_RESOLUTION_DEFAULT = HorizontalResolution.BLOCK; String DRAW_RESOLUTION_DESC = "" + " What is the maximum detail fake chunks should be drawn at? \n" + + " This setting will only affect closer chunks.\n" + " Higher settings will increase memory and GPU usage. \n" + "\n" + " " + HorizontalResolution.CHUNK + ": render 1 LOD for each Chunk. \n" @@ -89,6 +90,15 @@ public interface ILodConfigWrapperSingleton HorizontalResolution getDrawResolution(); void setDrawResolution(HorizontalResolution newHorizontalResolution); + MinDefaultMax DRAW_RESOLUTION_OFFSET_MIN_DEFAULT_MAX = new MinDefaultMax(0, 0, 4); + String DRAW_RESOLUTION_OFFSET_DESC = "" + + " By how many levels should we lower resolution across the board?\n" + + " Very similar to 'Block size',\n" + + " but this setting will affect ALL chunks.\n" + + " Lower settings will increase memory and GPU usage. \n"; + Integer getDrawResolutionOffset(); + void setDrawResolutionOffset(int newDrawResolutionOffset); + MinDefaultMax LOD_CHUNK_RENDER_DISTANCE_MIN_DEFAULT_MAX = new MinDefaultMax(16, 64, 1024); String LOD_CHUNK_RENDER_DISTANCE_DESC = "" + " The radius of the mod's render distance. (measured in chunks) \n";