late_sweep_material_instances

Function late_sweep_material_instances 

Source
pub fn late_sweep_material_instances(
    material_instances: ResMut<'_, RenderMaterialInstances>,
    removed_meshes_query: Extract<'_, '_, RemovedComponents<'_, '_, Mesh3d>>,
)
Expand description

Removes mesh materials from RenderMaterialInstances when their ViewVisibility components are removed.

This runs after all invocations of early_sweep_material_instances and is responsible for bumping RenderMaterialInstances::current_change_tick in preparation for a new frame.