CascadeState

Per-cascade light-space transforms and view-frustum slice metadata.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

View-space -z upper bound of the camera-frustum slice this cascade covers.

Link copied to clipboard

true when this cascade has been populated for the current frame.

Link copied to clipboard

Light-eye-space → light-clip-space orthographic projection for the depth pass.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Light-space depth range in metres (near plane to far plane of lightProjection).

Link copied to clipboard

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.

Link copied to clipboard

World-space size of one shadow-map texel in metres — drives the receiver normal-offset bias.

Functions

Link copied to clipboard
Link copied to clipboard
fun intersectsSphere(worldCenter: Vec3, worldRadius: Double): Boolean

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.