Recomputes the 6 planes from a view-projection matrix. Returns this so
callers can chain a test right after.
Returns true if the world-space sphere is at least partially inside the frustum (conservative: never reports a visible sphere as culled).
Tests planeCount planes (default all 6). Pass 5 to skip the near plane
— see the class note on shadow pancaking.
View frustum as 6 planes extracted from a view-projection matrix (Gribb–Hartmann), normalized so a plane evaluation yields a true signed distance. Reused in place via setFromViewProj to keep per-frame culling allocation-free.
Plane order is
0 left, 1 right, 2 bottom, 3 top, 4 far, 5 near. The near plane (toward the camera / light) is intentionally last so callers that must keep geometry in front of it — e.g. shadow depth-clamp "pancaking", where an occluder closer to the light than the cascade box still casts — can test only the first five planes by passingplaneCount = 5.Clip-space convention is WebGPU's: x,y ∈ [-1, 1], z ∈ [0, 1].