diff options
-rw-r--r-- | src/main/java/makamys/neodymium/Config.java | 2 | ||||
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/makamys/neodymium/Config.java b/src/main/java/makamys/neodymium/Config.java index 8ac1ce3..4237099 100644 --- a/src/main/java/makamys/neodymium/Config.java +++ b/src/main/java/makamys/neodymium/Config.java @@ -46,6 +46,8 @@ public class Config { public static int sortFrequency; @ConfigBoolean(cat="render", def=true, com="Don't render meshes that are shrouded in fog. OptiFine also does this when fog is turned on, this setting makes Neodymium follow suit.") public static boolean fogOcclusion; + @ConfigBoolean(cat="render", def=false, com="Do fog occlusion even if fog is disabled.") + public static boolean fogOcclusionWithoutFog; @NeedsReload @ConfigInt(cat="render", def=512, min=1, max=Integer.MAX_VALUE, com="VRAM buffer size (MB). 512 seems to be a good value on Normal render distance. Increase this if you encounter warnings about the VRAM getting full. Does not affect RAM usage.") diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index b6031a5..7844d24 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -203,7 +203,13 @@ public class NeoRenderer { private boolean shouldRenderMesh(Mesh mesh) { if(mesh.visible && (Config.maxMeshesPerFrame == -1 || renderedMeshes < Config.maxMeshesPerFrame)) { - if(!Config.renderFog || !Config.fogOcclusion || mesh.distSq(eyePosX / 16.0, mesh.y + 0.5, eyePosZ / 16.0) < Math.pow((fogStartEnd.get(1)) / 16.0 + 1.0, 2)) { + if((!Config.renderFog && !Config.fogOcclusionWithoutFog) + || Config.fogOcclusion == !Config.fogOcclusion + || mesh.distSq( + eyePosX / 16.0, + mesh.y + 0.5, + eyePosZ / 16.0) + < Math.pow((fogStartEnd.get(1)) / 16.0 + 1.0, 2)) { return true; } } |