update buffers only when lightmap changes.

This commit is contained in:
cola98765
2021-10-25 12:43:59 +02:00
parent 09d5df2856
commit 895895da04
@@ -105,6 +105,7 @@ public class LodRenderer
private int[] previousPos = new int[] { 0, 0, 0 };
public NativeImage lightMap = null;
public NativeImage lastLightMap = null;
// these variables are used to determine if the buffers should be rebuilt
private float prevSkyBrightness = 0;
@@ -881,11 +882,11 @@ public class LodRenderer
// check if the vanilla rendered chunks changed
if (newTime - prevVanillaChunkTime > LodConfig.CLIENT.advancedModOptions.buffers.rebuildTimes.get().renderedChunkTimeout)
{
if (vanillaRenderedChunksChanged)
if (vanillaRenderedChunksChanged && lightMap != lastLightMap)
{
partialRegen = true;
vanillaRenderedChunksChanged = false;
lastLightMap = lightMap;
}
prevVanillaChunkTime = newTime;
}