Skip to main content

get_shadow_lod_origin

Function get_shadow_lod_origin 

Source
pub fn get_shadow_lod_origin(
    camera_query: QueryLens<'_, (Entity, &RenderTarget), With<Camera>>,
    shadow_lod_origin_query: QueryLens<'_, Entity, With<ShadowLodOrigin>>,
    lights_query: QueryLens<'_, Entity, Or<(With<PointLight>, With<SpotLight>)>>,
) -> Option<Entity>
Expand description

Determines the LOD origin for spot and point light shadow maps.

The selection priority is, from highest to lowest:

  1. An entity explicitly marked with the ShadowLodOrigin component.

  2. A camera that renders to a window.

  3. Any camera.