Explain how AmbientLight is inserted and configured (#10712)
This commit is contained in:
parent
e85af0e366
commit
790fafdbb0
@ -544,6 +544,20 @@ fn calculate_cascade(
|
||||
}
|
||||
|
||||
/// An ambient light, which lights the entire scene equally.
|
||||
///
|
||||
/// This resource is inserted by the [`PbrPlugin`] and by default it is set to a low ambient light.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Make ambient light slightly brighter:
|
||||
///
|
||||
/// ```
|
||||
/// # use bevy_ecs::system::ResMut;
|
||||
/// # use bevy_pbr::AmbientLight;
|
||||
/// fn setup_ambient_light(mut ambient_light: ResMut<AmbientLight>) {
|
||||
/// ambient_light.brightness = 0.3;
|
||||
/// }
|
||||
/// ```
|
||||
#[derive(Resource, Clone, Debug, ExtractResource, Reflect)]
|
||||
#[reflect(Resource)]
|
||||
pub struct AmbientLight {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user