From 198c72c6df9e74c83ad52e96b4e0ca64d3f2aa6e Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Thu, 23 Nov 2023 19:08:56 +0000 Subject: [PATCH] Explain AmbientLight --- crates/bevy_pbr/src/light.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/bevy_pbr/src/light.rs b/crates/bevy_pbr/src/light.rs index 9902ce391c550..266d24746500e 100644 --- a/crates/bevy_pbr/src/light.rs +++ b/crates/bevy_pbr/src/light.rs @@ -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) { +/// ambient_light.brightness = 0.3; +/// } +/// ``` #[derive(Resource, Clone, Debug, ExtractResource, Reflect)] #[reflect(Resource)] pub struct AmbientLight {