Function prepare_lights
Source pub fn prepare_lights(
commands: Commands<'_, '_>,
texture_cache: ResMut<'_, TextureCache>,
(render_device, render_queue): (Res<'_, RenderDevice>, Res<'_, RenderQueue>),
global_clusterable_object_meta: ResMut<'_, GlobalClusterableObjectMeta>,
light_meta: ResMut<'_, LightMeta>,
views: Query<'_, '_, (Entity, MainEntity, &ExtractedView, &ExtractedClusterConfig, Option<&RenderLayers>, Has<NoIndirectDrawing>, Option<&AmbientLight>), With<Camera3d>>,
ambient_light: Res<'_, GlobalAmbientLight>,
point_light_shadow_map: Res<'_, PointLightShadowMap>,
directional_light_shadow_map: Res<'_, DirectionalLightShadowMap>,
shadow_render_phases: ResMut<'_, ViewBinnedRenderPhases<Shadow>>,
(max_directional_lights_warning_emitted, max_rect_lights_warning_emitted, max_cascades_per_light_warning_emitted, live_shadow_mapping_lights): (Local<'_, bool>, Local<'_, bool>, Local<'_, bool>, Local<'_, HashSet<RetainedViewEntity>>),
(point_lights, changed_point_lights, directional_lights, rect_lights, directional_light_view_entities): (Query<'_, '_, (Entity, &MainEntity, &ExtractedPointLight, &mut PointAndSpotLightViewEntities, AnyOf<(&CubemapFrusta, &Frustum)>)>, Query<'_, '_, (), Or<(Changed<ExtractedPointLight>, Changed<CubemapFrusta>, Changed<Frustum>)>>, Query<'_, '_, (Entity, &MainEntity, &ExtractedDirectionalLight)>, Query<'_, '_, (Entity, &MainEntity, &ExtractedRectLight)>, Query<'_, '_, &mut DirectionalLightViewEntities>),
sorted_cameras: Res<'_, SortedCameras>,
(gpu_preprocessing_support, decals): (Res<'_, GpuPreprocessingSupport>, Option<Res<'_, RenderClusteredDecals>>),
(existing_shadow_views, light_key_cache, specialized_shadow_material_pipeline_cache): (Query<'_, '_, &ShadowView>, ResMut<'_, LightKeyCache>, ResMut<'_, SpecializedShadowMaterialPipelineCache>),
)