Scale-aware near-plane floor for a scene with the given
(safety-expanded) bounding-sphere radius.
This is the floor that says nothing about depth-buffer precision. Which
role it plays depends on the projection:
Perspective — a dominated backstop. nearPlaneFloor raises
near to far / MAX_NEAR_FAR_RATIO, which is always larger (far >= R
always holds, so far / 1200 >= 8e-4 · R versus this 2e-6 · R). It
surfaces only at R -> 0, where it yields MIN_NEAR_PLANE and keeps the
callers' degenerate-frustum guard tripping instead of NaN-ing.
Orthographic — the OPERATIVE floor. Ortho opts out of the ratio bound
(linear depth, nothing to gain, real clipping cost), so nearPlaneFloor
returns exactly this value.
Clipping paths must still go through nearPlaneFloor rather than calling
this directly, so the projection decision lives in one place. Reading it
directly is fine for callers that want the LOWEST near the policy can ever
produce — RenderingControls.updateClippingSliderRanges does exactly that
to pick the near slider's minimum.
Scale-aware near-plane floor for a scene with the given (safety-expanded) bounding-sphere radius.
This is the floor that says nothing about depth-buffer precision. Which role it plays depends on the projection:
neartofar / MAX_NEAR_FAR_RATIO, which is always larger (far >= Ralways holds, sofar / 1200 >= 8e-4 · Rversus this2e-6 · R). It surfaces only atR -> 0, where it yieldsMIN_NEAR_PLANEand keeps the callers' degenerate-frustum guard tripping instead of NaN-ing.nearPlaneFloorreturns exactly this value.Clipping paths must still go through
nearPlaneFloorrather than calling this directly, so the projection decision lives in one place. Reading it directly is fine for callers that want the LOWEST near the policy can ever produce —RenderingControls.updateClippingSliderRangesdoes exactly that to pick the near slider's minimum.