Skip to main content

Module shadow_schedule

Module shadow_schedule 

Source
Expand description

Cross-backend cascade re-render scheduling for the cascaded shadow map. The shadow pass re-rasterizes all scene geometry into every cascade slice, so it is one of the heaviest passes; ShadowUpdate::Hybrid amortizes the far cascades across frames (near cascade every frame, one far cascade round-robin) while keeping each slice primed before it is sampled. Shared by all three backends so the policy lives once next to the CSM math in csm.rs.

Structs§

ShadowCascadeScheduler
Round-robin clock + primed-set state for the cascade re-render schedule. One per renderer; next_mask advances it once per frame and returns which cascades to re-render. The caller refreshes only those cascades’ light VPs and re-rasterizes only those slices, so skipped cascades keep the depth + VP they were last rendered with.