Skip to main content

collect_gpu_culled_meshes

Function collect_gpu_culled_meshes 

Source
pub fn collect_gpu_culled_meshes(
    cameras: Query<'_, '_, (Option<&RenderLayers>, &mut RenderVisibleEntities), With<ExtractedView>>,
    lights: Query<'_, '_, (Option<&RenderLayers>, &mut RenderShadowMapVisibleEntities)>,
    render_gpu_culled_entities: ResMut<'_, RenderGpuCulledEntities>,
)
Expand description

Transfers entities from RenderGpuCulledEntities to the RenderVisibleEntities and RenderShadowMapVisibleEntities components on each view.

Each view must maintain a separate list of GPU-culled entities because the views and entities might belong to different render layers.