Skip to main content

extract_atmosphere

Function extract_atmosphere 

Source
pub fn extract_atmosphere(
    commands: Commands<'_, '_>,
    atmosphere_entities: Extract<'_, '_, Query<'_, '_, (Entity, &Atmosphere, &GlobalTransform)>>,
    cameras: Extract<'_, '_, Query<'_, '_, (RenderEntity, &AtmosphereSettings, &GlobalTransform), With<Camera3d>>>,
)
Expand description

For each camera with AtmosphereSettings, picks the nearest Atmosphere by world-space distance to its origin, copies it as ExtractedAtmosphere, and builds GpuAtmosphereSettings.