Skip to content

Commit 47eee93

Browse files
Docs for emissive color on StandardMaterial (#20497)
# Objective Fixes #18993. ## Solution I've done my best to synthesize and carefully word the discussion in the linked issue. That said, this is not my domain, so critique is very welcome.
1 parent 8fe6781 commit 47eee93

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

crates/bevy_pbr/src/pbr_material.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,25 @@ pub struct StandardMaterial {
7878
///
7979
/// The default emissive color is [`LinearRgba::BLACK`], which doesn't add anything to the material color.
8080
///
81-
/// To increase emissive strength, channel values for `emissive`
81+
/// Emissive strength is controlled by the value of the color channels,
82+
/// while the hue is controlled by their relative values.
83+
///
84+
/// As a result, channel values for `emissive`
8285
/// colors can exceed `1.0`. For instance, a `base_color` of
8386
/// `LinearRgba::rgb(1.0, 0.0, 0.0)` represents the brightest
8487
/// red for objects that reflect light, but an emissive color
8588
/// like `LinearRgba::rgb(1000.0, 0.0, 0.0)` can be used to create
8689
/// intensely bright red emissive effects.
8790
///
91+
/// This results in a final luminance value when multiplied
92+
/// by the value of the greyscale emissive texture (which ranges from 0 for black to 1 for white).
93+
/// Luminance is a measure of the amount of light emitted per unit area,
94+
/// and can be thought of as the "brightness" of the effect.
95+
/// In Bevy, we treat these luminance values as the physical units of cd/m², aka nits.
96+
///
8897
/// Increasing the emissive strength of the color will impact visual effects
8998
/// like bloom, but it's important to note that **an emissive material won't
90-
/// light up surrounding areas like a light source**,
99+
/// typically light up surrounding areas like a light source**,
91100
/// it just adds a value to the color seen on screen.
92101
pub emissive: LinearRgba,
93102

0 commit comments

Comments
 (0)