This commit is contained in:
mcrcortex
2025-04-08 16:26:01 +10:00
parent 7af77296ed
commit c5cf08365f
2 changed files with 4 additions and 1 deletions

View File

@@ -27,6 +27,9 @@ public class RenderDistanceTracker {
}
public void setRenderDistance(int renderDistance) {
if (renderDistance == this.renderDistance) {
return;
}
this.renderDistance = renderDistance;
this.tracker.unload();//Mark all as unload
this.tracker = new RingTracker(this.tracker, renderDistance, ((int)this.posX)>>9, ((int)this.posZ)>>9, true);//Steal from previous tracker

View File

@@ -77,7 +77,7 @@ void setupScreenspace(in UnpackedNode node) {
//Checks if the node is implicitly culled (outside frustum)
bool outsideFrustum() {
return any(lessThanEqual(maxBB, vec3(0.0f))) || any(lessThanEqual(vec3(1.0f), minBB)) || maxBB.z < 0.5f || maxBB.z > 1;// maxBB.z > 1 is actually wrong
return any(lessThanEqual(maxBB, vec3(0.0f))) || any(lessThanEqual(vec3(1.0f), minBB)) || maxBB.z < 0.5f;// maxBB.z > 1 is actually wrong
//|| any(lessThanEqual(minBB, vec3(0.0f, 0.0f, 0.0f))) || any(lessThanEqual(vec3(1.0f, 1.0f, 1.0f), maxBB));
}