From c37e81b34ae0aa4b118fe80e6d9241be987c7dad Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Tue, 18 Jun 2024 07:20:10 -0400 Subject: [PATCH] Specify units in `AmbientLight::brightness` docs (#13297) # Objective - Fixes #11933. - Related: #12280. ## Solution - Specify that, after applying `AmbientLight`, the resulting units are in cd/m^2. - This is based on [@fintelia's comment](https://github.com/bevyengine/bevy/issues/11933#issuecomment-1995427587), and will need to be verified. --- ## Changelog - Specified units for `AmbientLight`'s `brightness` field. --- crates/bevy_pbr/src/light/ambient_light.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_pbr/src/light/ambient_light.rs b/crates/bevy_pbr/src/light/ambient_light.rs index d3f7744bd4f5c..9bff67d5f836d 100644 --- a/crates/bevy_pbr/src/light/ambient_light.rs +++ b/crates/bevy_pbr/src/light/ambient_light.rs @@ -20,6 +20,10 @@ use super::*; pub struct AmbientLight { pub color: Color, /// A direct scale factor multiplied with `color` before being passed to the shader. + /// + /// After applying this multiplier, the resulting value should be in units of [cd/m^2]. + /// + /// [cd/m^2]: https://en.wikipedia.org/wiki/Candela_per_square_metre pub brightness: f32, }