Releases shadow depth maps and uniform buffer allocations from GPU memory.
Propagates active PCF filtering settings to standard PBR materials.
Active mesh array.
Toggle PCF.
Re-allocates shadow depth texture and views if resolution or cascade settings changed. Returns true if new assets were allocated, signaling parent systems to mark bind groups as dirty.
Requested resolution.
Toggle CSM mode.
Active cascade layers count.
True if texture was re-created, false otherwise.
Renders shadow map depth passes. Calculates camera splits, projects cascades, renders layered textures, or falls back to standard orthographic directional or perspective spotlight depth maps.
GPU command encoder pipeline interface.
Current scene lights array.
Current active viewport camera.
Grouped meshes sorted by instancing batch keys.
Allocated matrix buffer batches.
Active scene meshes array.
True if depth rendering was completed, false otherwise.
GPUBindGroup mapping shadow uniforms to group 0.
Active cascade count for CSM.
Computed combined view-projection matrix from the light source's viewpoint (non-CSM).
Dedicated comparison sampler checking depth values.
Allocated GPU depth texture (single 2D texture or 2D texture array).
Resolution size (width/height) of the square shadow map texture. Defaults to 2048.
GPUBuffer containing light view-projection matrices and texel sizes.
If true, the shadow system is currently utilizing Cascaded Shadow Maps.
ShadowSystem coordinates standard orthographic shadow depth map passes for directional lights, spotlight perspective shadow map passes, and Cascaded Shadow Maps (CSM) for directional lights. Handles shadow map resource allocations (depth textures, comparison samplers, uniform buffers), computes orthographic camera matrices aligned with directional vectors, implements texel-snapping to eliminate crawling shadow boundaries, and handles instanced batch drawing.