Function queue_shadows

Source
pub fn queue_shadows<M: Material>(
    shadow_draw_functions: Res<'_, DrawFunctions<Shadow>>,
    render_mesh_instances: Res<'_, RenderMeshInstances>,
    render_materials: Res<'_, RenderAssets<PreparedMaterial<M>>>,
    render_material_instances: Res<'_, RenderMaterialInstances>,
    shadow_render_phases: ResMut<'_, ViewBinnedRenderPhases<Shadow>>,
    gpu_preprocessing_support: Res<'_, GpuPreprocessingSupport>,
    mesh_allocator: Res<'_, MeshAllocator>,
    view_lights: Query<'_, '_, (Entity, &ViewLightEntities), With<ExtractedView>>,
    view_light_entities: Query<'_, '_, (&LightEntity, &ExtractedView)>,
    point_light_entities: Query<'_, '_, &RenderCubemapVisibleEntities, With<ExtractedPointLight>>,
    directional_light_entities: Query<'_, '_, &RenderCascadesVisibleEntities, With<ExtractedDirectionalLight>>,
    spot_light_entities: Query<'_, '_, &RenderVisibleMeshEntities, With<ExtractedPointLight>>,
    specialized_material_pipeline_cache: Res<'_, SpecializedShadowMaterialPipelineCache<M>>,
)
where M::Data: PartialEq + Eq + Hash + Clone,
Expand description

For each shadow cascade, iterates over all the meshes “visible” from it and adds them to BinnedRenderPhases or SortedRenderPhases as appropriate.