Fix a buffer bug related to building near and far incorrectly

Also correctly use the near and far buffers if only one is supposed to
be used
This commit is contained in:
James Seibel
2021-02-14 10:00:42 -06:00
parent 4baf60bc52
commit 5301b5d567
2 changed files with 6 additions and 4 deletions
@@ -343,7 +343,7 @@ public class LodRenderer
mc.mcProfiler.endStartSection("LOD build buffer");
if (regen)
generateLodBuffers(lodArray, colorArray, FogDistance.BOTH, new Vec3i(startX, 0, startZ));
generateLodBuffers(lodArray, colorArray, LodConfig.fogDistance, new Vec3i(startX, 0, startZ));
switch(LodConfig.fogDistance)
{
@@ -360,12 +360,10 @@ public class LodRenderer
mc.mcProfiler.endStartSection("LOD draw setup");
setupFog(FogDistance.NEAR, reflectionHandler.getFogQuality());
sendLodsToGpuAndDraw(nearBuffers);
sendLodsToGpuAndDraw(farBuffers);
break;
case FAR:
mc.mcProfiler.endStartSection("LOD draw setup");
setupFog(FogDistance.FAR, reflectionHandler.getFogQuality());
sendLodsToGpuAndDraw(nearBuffers);
sendLodsToGpuAndDraw(farBuffers);
break;
}