Rename FogDistance BOTH to NEAR_AND_FAR

This commit is contained in:
James Seibel
2021-02-14 10:08:00 -06:00
parent eec46f6f15
commit 9cfeb30834
4 changed files with 11 additions and 11 deletions
@@ -121,7 +121,7 @@ public class BuildBufferThread implements Callable<NearFarBuffer>
alpha = colors[i][j].getAlpha();
// choose which buffer to add these LODs too
if (distanceMode == FogDistance.BOTH)
if (distanceMode == FogDistance.NEAR_AND_FAR)
{
if (RenderUtil.isCoordinateInNearFogArea(i, j, numbChunksWide / 2))
currentBuffer = nearBuffer;
@@ -88,7 +88,7 @@ public class LodRenderer
/** This is used to determine if the LODs should be regenerated */
private int prevChunkZ = 0;
/** This is used to determine if the LODs should be regenerated */
private FogDistance prevFogDistance = FogDistance.BOTH;
private FogDistance prevFogDistance = FogDistance.NEAR_AND_FAR;
/** if this is true the LODs should be regenerated */
private boolean regen = false;
@@ -351,7 +351,7 @@ public class LodRenderer
switch(LodConfig.fogDistance)
{
case BOTH:
case NEAR_AND_FAR:
mc.mcProfiler.endStartSection("LOD draw setup");
setupFog(FogDistance.NEAR, reflectionHandler.getFogQuality());
sendLodsToGpuAndDraw(nearBuffers);
@@ -527,7 +527,7 @@ public class LodRenderer
return;
}
if(fogDistance == FogDistance.BOTH)
if(fogDistance == FogDistance.NEAR_AND_FAR)
{
throw new IllegalArgumentException("setupFog only accepts NEAR or FAR fog distances.");
}
@@ -42,7 +42,7 @@ public class LodConfig
@Config.Comment(
{"Fog Distance",
"What distance should Fog be drawn on the LODs?"})
public static FogDistance fogDistance = FogDistance.BOTH;
public static FogDistance fogDistance = FogDistance.NEAR_AND_FAR;
@Config.Comment(
{"Use Optifine Fog Quality Setting",
@@ -1,17 +1,17 @@
package com.backsun.lod.util.enums;
/**
* Near, far, or both.
* Near, far, or NEAR_AND_FAR.
*
* @author James Seibel
* @version 01-27-2021
* @version 02-14-2021
*/
public enum FogDistance
{
/** valid for both fast and fancy qualities. */
/** valid for both fast and fancy fog qualities. */
NEAR,
/** valid for both fast and fancy qualities. */
/** valid for both fast and fancy fog qualities. */
FAR,
/** only valid if the quality is set to Fancy. */
BOTH;
/** only looks good if the fog quality is set to Fancy. */
NEAR_AND_FAR;
}