Calculates camera clipping planes based on a bounding sphere.
Uses a sphere instead of a bounding box to avoid discontinuities at box
edges/corners. The sphere produces smooth near/far values as the camera
moves, eliminating the need for exponential smoothing.
near is the nearest point on the sphere surface, floored by
nearPlaneFloor — which is what keeps the near/far ratio (and
therefore depth-buffer precision) bounded once the camera moves INSIDE
the sphere, the regime where the bare surface distance goes to zero.
Calculates camera clipping planes based on a bounding sphere.
Uses a sphere instead of a bounding box to avoid discontinuities at box edges/corners. The sphere produces smooth near/far values as the camera moves, eliminating the need for exponential smoothing.
nearis the nearest point on the sphere surface, floored by nearPlaneFloor — which is what keeps the near/far ratio (and therefore depth-buffer precision) bounded once the camera moves INSIDE the sphere, the regime where the bare surface distance goes to zero.