Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation explaining the difference between lumens and luxes #11551

Merged
merged 2 commits into from
Jan 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions crates/bevy_pbr/src/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading