mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-22 13:19:44 +00:00
Rebuild chunk graph if fog distance changes
This commit is contained in:
1 parent
818f4d3cca
commit
17dddb6691
1 file changed
+6
-1
@@ -12,6 +12,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
||||
import jss.notfine.core.SettingsManager;
|
||||
import lombok.Getter;
|
||||
import me.jellysquid.mods.sodium.client.SodiumClientMod;
|
||||
import me.jellysquid.mods.sodium.client.gl.compat.FogHelper;
|
||||
import me.jellysquid.mods.sodium.client.gl.device.RenderDevice;
|
||||
import me.jellysquid.mods.sodium.client.gui.SodiumGameOptions;
|
||||
import me.jellysquid.mods.sodium.client.model.vertex.type.ChunkVertexType;
|
||||
@@ -63,6 +64,7 @@ public class SodiumWorldRenderer implements ChunkStatusListener {
|
||||
|
||||
private double lastCameraX, lastCameraY, lastCameraZ;
|
||||
private double lastCameraPitch, lastCameraYaw;
|
||||
private float lastFogDistance;
|
||||
|
||||
private boolean useEntityCulling;
|
||||
|
||||
@@ -208,8 +210,10 @@ public class SodiumWorldRenderer implements ChunkStatusListener {
|
||||
float pitch = camera.getPitch();
|
||||
float yaw = camera.getYaw();
|
||||
|
||||
float fogDistance = FogHelper.getFogCutoff();
|
||||
|
||||
boolean dirty = pos.x != this.lastCameraX || pos.y != this.lastCameraY || pos.z != this.lastCameraZ ||
|
||||
pitch != this.lastCameraPitch || yaw != this.lastCameraYaw;
|
||||
pitch != this.lastCameraPitch || yaw != this.lastCameraYaw || fogDistance != this.lastFogDistance;
|
||||
|
||||
if(AngelicaConfig.enableIris) {
|
||||
iris$ensureStateSwapped();
|
||||
@@ -226,6 +230,7 @@ public class SodiumWorldRenderer implements ChunkStatusListener {
|
||||
this.lastCameraZ = pos.z;
|
||||
this.lastCameraPitch = pitch;
|
||||
this.lastCameraYaw = yaw;
|
||||
this.lastFogDistance = fogDistance;
|
||||
|
||||
profiler.endStartSection("chunk_update");
|
||||
|
||||
|
||||
Reference in new issue
Block a user