removed lodChunkRadiusMultiplier from proxy, config and renderer
This commit is contained in:
@@ -66,17 +66,11 @@ public class LodConfig
|
||||
|
||||
public ForgeConfigSpec.EnumValue<ShadingMode> shadingMode;
|
||||
|
||||
/**
|
||||
* this is multiplied by the default view distance
|
||||
* to determine how far out to generate/render LODs
|
||||
*/
|
||||
public ForgeConfigSpec.IntValue lodChunkRadiusMultiplier;
|
||||
|
||||
public ForgeConfigSpec.EnumValue<DistanceCalculatorType> lodDistanceCalculatorType;
|
||||
|
||||
public ForgeConfigSpec.IntValue lodQuality;
|
||||
|
||||
public ForgeConfigSpec.IntValue lodChunkRenderDistane;
|
||||
public ForgeConfigSpec.IntValue lodChunkRenderDistance;
|
||||
|
||||
public ForgeConfigSpec.DoubleValue brightnessMultiplier;
|
||||
|
||||
@@ -148,15 +142,6 @@ public class LodConfig
|
||||
+ " " + LodDetail.FULL.toString() + ": render 256 LODs for each Chunk. \n")
|
||||
.defineEnum("lodGenerationQuality", LodDetail.DOUBLE);
|
||||
|
||||
|
||||
lodChunkRadiusMultiplier = builder
|
||||
.comment("\n\n"
|
||||
+ " This is multiplied by the default view distance \n"
|
||||
+ " to determine how far out to generate/render LODs. \n"
|
||||
+ " A value of 2 means that there is 1 render distance worth \n"
|
||||
+ " of LODs in each cardinal direction. \n")
|
||||
.defineInRange("lodChunkRadiusMultiplier", 8, 2, 16);
|
||||
|
||||
lodDistanceCalculatorType = builder
|
||||
.comment("\n\n"
|
||||
+ " " + DistanceCalculatorType.LINEAR + " \n"
|
||||
@@ -173,12 +158,12 @@ public class LodConfig
|
||||
.comment("\n\n"
|
||||
+ " this value is multiplied by 128 and determine \n"
|
||||
+ " how much the quality decrease over distance \n")
|
||||
.defineInRange("lodChunkRadiusMultiplier", 1, 1, 4);
|
||||
.defineInRange("lodQuality", 1, 1, 4);
|
||||
|
||||
lodChunkRenderDistane = builder
|
||||
lodChunkRenderDistance = builder
|
||||
.comment("\n\n"
|
||||
+ " This is the render distance of the mod \n")
|
||||
.defineInRange("lodChunkRadiusMultiplier", 128, 32, 128);
|
||||
.defineInRange("lodChunkRenderDistane", 128, 32, 128);
|
||||
|
||||
distanceGenerationMode = builder
|
||||
.comment("\n\n"
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ClientProxy
|
||||
/** This is used to determine if the LODs should be regenerated */
|
||||
public static int previousChunkRenderDistance = 0;
|
||||
/** This is used to determine if the LODs should be regenerated */
|
||||
public static int previousLodMultiplierDistance = 0;
|
||||
public static int previousLodRenderDistance = 0;
|
||||
|
||||
/** can be set if we want to recalculate variables related
|
||||
* to the LOD view distance */
|
||||
@@ -124,7 +124,7 @@ public class ClientProxy
|
||||
// these can't be set until after the buffers are built (in renderer.drawLODs)
|
||||
// otherwise the buffers may be set to the wrong size, or not changed at all
|
||||
previousChunkRenderDistance = mc.options.renderDistance;
|
||||
previousLodMultiplierDistance = LodConfig.CLIENT.lodChunkRadiusMultiplier.get();
|
||||
previousLodRenderDistance = LodConfig.CLIENT.lodChunkRenderDistance.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -142,9 +142,8 @@ public class ClientProxy
|
||||
|
||||
LodConfig.CLIENT.maxDrawDetail.set(LodDetail.FULL);
|
||||
LodConfig.CLIENT.maxGenerationDetail.set(LodDetail.FULL);
|
||||
|
||||
LodConfig.CLIENT.lodChunkRadiusMultiplier.set(16);
|
||||
LodConfig.CLIENT.fogDistance.set(FogDistance.NEAR);
|
||||
|
||||
LodConfig.CLIENT.fogDistance.set(FogDistance.FAR);
|
||||
LodConfig.CLIENT.fogDrawOverride.set(FogDrawOverride.ALWAYS_DRAW_FOG_FANCY);
|
||||
LodConfig.CLIENT.shadingMode.set(ShadingMode.DARKEN_SIDES);
|
||||
// LodConfig.CLIENT.brightnessMultiplier.set(1.0);
|
||||
@@ -152,7 +151,7 @@ public class ClientProxy
|
||||
|
||||
LodConfig.CLIENT.distanceGenerationMode.set(DistanceGenerationMode.FEATURES);
|
||||
LodConfig.CLIENT.allowUnstableFeatureGeneration.set(false);
|
||||
LodConfig.CLIENT.lodChunkRenderDistane.set(96);
|
||||
LodConfig.CLIENT.lodChunkRenderDistance.set(96);
|
||||
LodConfig.CLIENT.lodDistanceCalculatorType.set(DistanceCalculatorType.QUADRATIC);
|
||||
LodConfig.CLIENT.lodQuality.set(1);
|
||||
LodConfig.CLIENT.allowUnstableFeatureGeneration.set(false);
|
||||
@@ -256,8 +255,7 @@ public class ClientProxy
|
||||
private void viewDistanceChangedEvent()
|
||||
{
|
||||
// calculate how wide the dimension(s) should be in regions
|
||||
//int chunksWide = (mc.options.renderDistance * 2) * LodConfig.CLIENT.lodChunkRadiusMultiplier.get();
|
||||
int chunksWide = 8 * 2 * LodConfig.CLIENT.lodChunkRadiusMultiplier.get() + 1;
|
||||
int chunksWide = LodConfig.CLIENT.lodChunkRenderDistance.get() * 2 + 1;
|
||||
int newWidth = (int) Math.ceil(chunksWide / (float) LodUtil.REGION_WIDTH_IN_CHUNKS);
|
||||
newWidth = (newWidth % 2 == 0) ? (newWidth += 1) : (newWidth += 2); // make sure we have a odd number of regions
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ public class LodRenderer
|
||||
if ((int) player.getX() / LodUtil.CHUNK_WIDTH != prevChunkX ||
|
||||
(int) player.getZ() / LodUtil.CHUNK_WIDTH != prevChunkZ ||
|
||||
ClientProxy.previousChunkRenderDistance != mc.options.renderDistance ||
|
||||
ClientProxy.previousLodMultiplierDistance != LodConfig.CLIENT.lodChunkRadiusMultiplier.get() ||
|
||||
ClientProxy.previousLodRenderDistance != LodConfig.CLIENT.lodChunkRenderDistance.get() ||
|
||||
prevFogDistance != LodConfig.CLIENT.fogDistance.get())
|
||||
{
|
||||
// yes
|
||||
@@ -229,11 +229,10 @@ public class LodRenderer
|
||||
|
||||
// determine how far the game's render distance is currently set
|
||||
//farPlaneBlockDistance = mc.options.renderDistance * LodUtil.CHUNK_WIDTH;
|
||||
farPlaneBlockDistance = LodConfig.CLIENT.lodChunkRenderDistane.get() * LodUtil.CHUNK_WIDTH;
|
||||
farPlaneBlockDistance = LodConfig.CLIENT.lodChunkRenderDistance.get() * LodUtil.CHUNK_WIDTH;
|
||||
|
||||
// set how how far the LODs will go
|
||||
//int numbChunksWide = mc.options.renderDistance * 2 * LodConfig.CLIENT.lodChunkRadiusMultiplier.get();
|
||||
int numbChunksWide =LodConfig.CLIENT.lodChunkRenderDistane.get() * 2;
|
||||
int numbChunksWide =LodConfig.CLIENT.lodChunkRenderDistance.get() * 2;
|
||||
|
||||
// determine which LODs should not be rendered close to the player
|
||||
HashSet<ChunkPos> chunkPosToSkip = getNearbyLodChunkPosToSkip(lodDim, player.blockPosition());
|
||||
@@ -574,8 +573,8 @@ public class LodRenderer
|
||||
// it is possible to see the near clip plane, but
|
||||
// you have to be flying quickly in spectator mode through ungenerated
|
||||
// terrain, so I don't think it is much of an issue.
|
||||
LodConfig.CLIENT.lodChunkRadiusMultiplier.get(),
|
||||
this.farPlaneBlockDistance * LodConfig.CLIENT.lodChunkRadiusMultiplier.get() * 2);
|
||||
LodConfig.CLIENT.lodChunkRenderDistance.get() / mc.options.renderDistance,
|
||||
mc.options.renderDistance * LodUtil.CHUNK_WIDTH * 2);
|
||||
|
||||
// add the screen space distortions
|
||||
projectionMatrix.multiply(matrixStack.last().pose());
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.seibel.lod.util;
|
||||
|
||||
import com.seibel.lod.enums.DistanceCalculatorType;
|
||||
import com.seibel.lod.enums.DistanceGenerationMode;
|
||||
import com.seibel.lod.enums.LodQuality;
|
||||
import com.seibel.lod.handlers.LodConfig;
|
||||
|
||||
public class DetailUtil
|
||||
@@ -10,7 +8,7 @@ public class DetailUtil
|
||||
private static double genMultiplier = 1.5;
|
||||
private static final int maxDetail = LodUtil.REGION_DETAIL_LEVEL + 1;
|
||||
private static final int minDistance = 0;
|
||||
private static final int maxDistance = LodConfig.CLIENT.lodChunkRenderDistane.get() * 16;
|
||||
private static final int maxDistance = LodConfig.CLIENT.lodChunkRenderDistance.get() * 16;
|
||||
private static DistanceGenerationMode[] distancesGenerators = {
|
||||
DistanceGenerationMode.SURFACE,
|
||||
DistanceGenerationMode.SURFACE,
|
||||
|
||||
Reference in New Issue
Block a user