Expand description
Provides component types for lighting a bevy scene. This includes the usual directional, point, and spot lights, as well as light probes, atmosphere, other volumetrics, and shadow configuration.
Re-exports§
pub use cluster::ClusteredDecal;pub use atmosphere::Atmosphere;pub use cascade::CascadeShadowConfig;pub use cascade::CascadeShadowConfigBuilder;pub use cascade::Cascades;
Modules§
- atmosphere
- Provides types to specify atmosphere lighting, scattering terms, etc.
- cascade
- Provides shadow cascade configuration and construction helpers.
- cluster
- Spatial clustering of objects to accelerate rendering performance.
- light_
consts - Constants for operating with the light units: lumens, and lux.
- prelude
- The light prelude.
Structs§
- Ambient
Light - An ambient light, which lights the entire scene equally.
- Atmosphere
Environment MapLight - Lets the atmosphere contribute environment lighting (reflections and ambient diffuse) to your scene.
- Directional
Light - A Directional light.
- Directional
Light Shadow Map - Controls the resolution of
DirectionalLightandSpotLightshadow maps. - Directional
Light Texture - Add to a
DirectionalLightto add a light texture effect. A texture mask is applied to the light source to modulate its intensity,
simulating patterns like window shadows, gobo/cookie effects, or soft falloffs. - Environment
MapLight - A pair of cubemap textures that represent the surroundings of a specific area in space.
- FogVolume
- A unit cube of fog at the origin. Can be positioned and scaled with a
Transform. Only visible by cameras with aVolumetricFogcomponent when lit by a directional light withVolumetricLight. - Generated
Environment MapLight - A generated environment map that is filtered at runtime.
- Global
Ambient Light - The global ambient light, which lights the entire scene equally.
- Irradiance
Volume - The component that defines an irradiance volume.
- Light
Plugin - Sets up all the light visibility and clustering infrastructure needed for rendering lights.
- Light
Probe - A marker component for a light probe, which is a cuboid region that provides global illumination to all fragments inside it.
- NotShadow
Caster - Add this component to make a
Mesh3dnot cast shadows. - NotShadow
Receiver - Add this component to make a
Mesh3dnot receive shadows. - Point
Light - A light that emits light in all directions from a central point.
- Point
Light Shadow Map - Controls the resolution of
PointLightshadow maps. - Point
Light Texture - Add to a
PointLightto add a light texture effect. A texture mask is applied to the light source to modulate its intensity,
simulating patterns like window shadows, gobo/cookie effects, or soft falloffs. - Rect
Light - A rectangular area light.
- Skybox
- Adds a skybox to a 3D camera, based on a cubemap texture.
- Spot
Light - A light that emits light in a given direction from a central point.
- Spot
Light Texture - Add to a
SpotLightto add a light texture effect. A texture mask is applied to the light source to modulate its intensity,
simulating patterns like window shadows, gobo/cookie effects, or soft falloffs. - SunDisk
- Add to a
DirectionalLightto control rendering of the visible solar disk in the sky. Affects only the disk’s appearance, not the light’s illuminance or shadows. Requires abevy::pbr::Atmospherecomponent on aCamera3dto have any effect. - Transmitted
Shadow Receiver - Add this component to make a
Mesh3dusing a PBR material withStandardMaterial::diffuse_transmission > 0.0receive shadows on its diffuse transmission lobe. (i.e. its “backside”) - Volumetric
Fog - When placed on a
bevy_camera::Camera3d, enables volumetric fog and volumetric lighting, also known as light shafts or god rays. - Volumetric
Light - Add this component to a
DirectionalLightwith a shadow map (shadow_maps_enabled: true) to make volumetric fog interact with it.
Enums§
- Parallax
Correction - Add this component to a reflection probe to customize parallax correction.
- Shadow
Filtering Method - Add this component to a
Camera3dto control how to anti-alias shadow edges. - Simulation
Light Systems - System sets used to run light-related systems.
Functions§
- automatically_
add_ parallax_ correction_ components - A system that automatically adds a
ParallaxCorrection::Autocomponent to any reflection probe that doesn’t already have aParallaxCorrectioncomponent. - check_
dir_ light_ mesh_ visibility - Updates the visibility for
DirectionalLights so that shadow map rendering can work. - check_
point_ light_ mesh_ visibility - Updates the visibility for
PointLights andSpotLights so that shadow map rendering can work. - get_
shadow_ lod_ origin - Determines the LOD origin for spot and point light shadow maps.
- orthonormalize
- Constructs a right-handed orthonormal basis from a given unit Z vector.
- spot_
light_ clip_ from_ view - Creates the projection matrix that transforms the light’s view space into the light’s clip space.
- spot_
light_ world_ from_ view - Constructs a right-handed orthonormal basis with translation, using only the forward direction and translation of a given
GlobalTransform. - update_
directional_ light_ frusta - Updates the frusta for all visible shadow mapped
DirectionalLights. - update_
point_ light_ frusta - Updates the frusta for all visible shadow mapped
PointLights. - update_
spot_ light_ frusta - Updates the frusta for all visible shadow mapped
SpotLights.
Type Aliases§
- With
Light - A convenient alias for
Or<(With<PointLight>, With<SpotLight>, With<DirectionalLight>, With<RectLight>)>, for use withbevy_camera::visibility::VisibleEntities.