Skip to content

Commit

Permalink
Specify units in AmbientLight::brightness docs (bevyengine#13297)
Browse files Browse the repository at this point in the history
# Objective

- Fixes bevyengine#11933.
- Related: bevyengine#12280.

## Solution

- Specify that, after applying `AmbientLight`, the resulting units are
in cd/m^2.
- This is based on [@fintelia's
comment](bevyengine#11933 (comment)),
and will need to be verified.

---

## Changelog

- Specified units for `AmbientLight`'s `brightness` field.
  • Loading branch information
BD103 authored Jun 18, 2024
1 parent 001cc14 commit c37e81b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_pbr/src/light/ambient_light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit c37e81b

Please sign in to comment.