Cascade State
Per-cascade light-space transforms and view-frustum slice metadata.
Properties
Light-eye-space xy AABB of the cascade's stable bounding sphere — populated by ShadowLayer.computeCascade after the texel-grid snap. Used by intersectsSphere to fast-reject casters that fall entirely outside this cascade.
View-space -z upper bound of the camera-frustum slice this cascade covers.
Light-eye-space → light-clip-space orthographic projection for the depth pass.
Composed lightProjection * lightView (world → light clip), kept in double for the depth pass: caster MVPs must be composed against it on the CPU so the large light-frame translations cancel before the float32 upload — uploading lightView * model alone quantizes caster geometry to ~0.5 m at ECEF magnitude.
World → light-eye-space rotation+translation, with the cascade's near plane at light-eye z = 0. Drives the depth pass (earth.worldwind.draw.DrawableShadow composes caster model matrices against it) and caster culling.
Light-space depth range in metres (near plane to far plane of lightProjection).
Camera-relative world → cascade texture space (xy = UV in [0, 1], z = depth in [0, 1]). Composed on the CPU in double precision as texScaleBias * lightProjection * lightView * translate(cameraPoint) so receivers feed it worldPos - cameraPoint at full float32 precision.
World-space size of one shadow-map texel in metres — drives the receiver normal-offset bias.
Functions
Sphere-vs-AABB intersection test in light-eye space. The world-space sphere (worldCenter, worldRadius) is transformed through lightView and tested against the cascade's xy AABB plus its [-range, +infty] z range — casters above the slice (positive ez) still cast shadows down, so there's no upper z bound.