Adaptive raster culling #41
+3
-3
@@ -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. */
|
||||
|
||||
Reference in new issue
Block a user