fix 3-layer clouds culling at low render distances
This commit is contained in:
+6
-2
@@ -395,7 +395,8 @@ public class CloudRenderHandler
|
|||||||
this.level.getLevelWrapper().getMaxHeight()
|
this.level.getLevelWrapper().getMaxHeight()
|
||||||
+ 200 // render clouds at least 200 blocks above the height limit to prevent players/blocks from intersecting (since DH always renders behind everything else)
|
+ 200 // render clouds at least 200 blocks above the height limit to prevent players/blocks from intersecting (since DH always renders behind everything else)
|
||||||
+ cloudParams.heightOffset;
|
+ cloudParams.heightOffset;
|
||||||
float newMinPosZ = cloudParams.deltaOffsetZ
|
float newMinPosZ =
|
||||||
|
cloudParams.deltaOffsetZ
|
||||||
+ (cloudParams.instanceOffsetZ * cloudParams.widthInBlocks)
|
+ (cloudParams.instanceOffsetZ * cloudParams.widthInBlocks)
|
||||||
+ instanceOffsetZ + cloudParams.halfWidthInBlocks;
|
+ instanceOffsetZ + cloudParams.halfWidthInBlocks;
|
||||||
|
|
||||||
@@ -515,7 +516,10 @@ public class CloudRenderHandler
|
|||||||
DhVec3f cameraLookAtVector = MC_RENDER.getLookAtVector();
|
DhVec3f cameraLookAtVector = MC_RENDER.getLookAtVector();
|
||||||
cameraLookAtVector.normalize();
|
cameraLookAtVector.normalize();
|
||||||
|
|
||||||
double renderDistance = Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius.get()
|
double renderDistance =
|
||||||
|
// minimum distance of 256 to handle 3-layer clouds correctly,
|
||||||
|
// otherwise the upper layers will be culled
|
||||||
|
Math.max(Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius.get(), 256)
|
||||||
// * 1.5 is so we have a little extra buffer where clouds will render further than
|
// * 1.5 is so we have a little extra buffer where clouds will render further than
|
||||||
// necessary to prevent seeing the cloud border
|
// necessary to prevent seeing the cloud border
|
||||||
* LodUtil.CHUNK_WIDTH * 1.5;
|
* LodUtil.CHUNK_WIDTH * 1.5;
|
||||||
|
|||||||
Reference in New Issue
Block a user