Adaptive raster culling #41

Merged
embeddedt merged 9 commits from adaptive-raster-culling into stonecutter 2026-09-17 10:10:54 -04:00
Showing only changes of commit 91184716c2 - Show all commits
@@ -372,9 +372,9 @@ public class OcclusionCuller {
/** An upper bound on the squared chunk distance of any section the search can reach. */
private int maxSquaredChunkDistance(float searchDistance) {
int radius = (int) Math.ceil(searchDistance / 16.0f) + 1;
int height = (this.maxSectionY - this.minSectionY) + 1;
return (radius * radius) + (height * height);
// the distance test is cylindrical, so dy is bounded by the search distance, not the world height
int radius = (int) Math.ceil(searchDistance / 16.0f) + 2;
return 2 * radius * radius;
}
/** Farthest distance in blocks at which this search will test a section, for sizing the coverage buffer. */