From 2987072674677cc691c5fe3ff432e9f59b6e7f24 Mon Sep 17 00:00:00 2001 From: Miles Silberling-Cook Date: Fri, 26 Jan 2024 18:17:05 -0500 Subject: [PATCH 1/2] Add documentation explaining the difference between lumens and luxes --- crates/bevy_pbr/src/light.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/bevy_pbr/src/light.rs b/crates/bevy_pbr/src/light.rs index 1f08147411d3f..2213609ef6b84 100644 --- a/crates/bevy_pbr/src/light.rs +++ b/crates/bevy_pbr/src/light.rs @@ -41,7 +41,7 @@ use crate::*; #[reflect(Component, Default)] pub struct PointLight { pub color: Color, - /// Luminous power in lumens + /// Luminous power in lumens, representing the ammount of light emited by this source in all directions. pub intensity: f32, pub range: f32, pub radius: f32, @@ -92,7 +92,7 @@ impl Default for PointLightShadowMap { #[reflect(Component, Default)] pub struct SpotLight { pub color: Color, - /// Luminous power in lumens + /// Luminous power in lumens, representing the ammount of light emited by this source in all directions. pub intensity: f32, pub range: f32, pub radius: f32, @@ -188,7 +188,12 @@ impl Default for SpotLight { #[reflect(Component, Default)] pub struct DirectionalLight { pub color: Color, - /// Illuminance in lux + /// Illuminance in lux (lumens per square meter), representing the amount of + /// light projected onto surfaces by this lightsource. Lux is used here + /// instead of lumens because a directional light illuminates all surfaces + /// more-or-less the same way (depending on the angle of incidence). Lumens + /// can only be specified for light sources which emit light from a specific + /// area. pub illuminance: f32, pub shadows_enabled: bool, pub shadow_depth_bias: f32, From 51df8caefdb76b44023d2004d2208ef958c31d67 Mon Sep 17 00:00:00 2001 From: Miles Silberling-Cook Date: Fri, 26 Jan 2024 18:47:44 -0500 Subject: [PATCH 2/2] Fix spelling errors --- crates/bevy_pbr/src/light.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_pbr/src/light.rs b/crates/bevy_pbr/src/light.rs index 2213609ef6b84..4befa56fff767 100644 --- a/crates/bevy_pbr/src/light.rs +++ b/crates/bevy_pbr/src/light.rs @@ -41,7 +41,7 @@ use crate::*; #[reflect(Component, Default)] pub struct PointLight { pub color: Color, - /// Luminous power in lumens, representing the ammount of light emited by this source in all directions. + /// Luminous power in lumens, representing the amount of light emitted by this source in all directions. pub intensity: f32, pub range: f32, pub radius: f32, @@ -92,7 +92,7 @@ impl Default for PointLightShadowMap { #[reflect(Component, Default)] pub struct SpotLight { pub color: Color, - /// Luminous power in lumens, representing the ammount of light emited by this source in all directions. + /// Luminous power in lumens, representing the amount of light emitted by this source in all directions. pub intensity: f32, pub range: f32, pub radius: f32, @@ -189,7 +189,7 @@ impl Default for SpotLight { pub struct DirectionalLight { pub color: Color, /// Illuminance in lux (lumens per square meter), representing the amount of - /// light projected onto surfaces by this lightsource. Lux is used here + /// light projected onto surfaces by this light source. Lux is used here /// instead of lumens because a directional light illuminates all surfaces /// more-or-less the same way (depending on the angle of incidence). Lumens /// can only be specified for light sources which emit light from a specific