Added documentation explaining the difference between lumens and luxes (#11551)

# Objective

- Fix https://github.com/bevyengine/bevy/issues/9809

## Solution

- Describe the difference between lumens and luxes, and why some
lightsources use one and some the other.
This commit is contained in:
Miles Silberling-Cook 2024-01-26 18:32:14 -06:00 committed by GitHub
parent 182c21dc58
commit 8f25805b66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 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
/// 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,
@ -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 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
/// area.
pub illuminance: f32,
pub shadows_enabled: bool,
pub shadow_depth_bias: f32,