pub struct SceneLuminance(/* private fields */);Expand description
Scene (world) luminance: a non-negative scalar in arbitrary linear units.
“Scene” here means pre-tone-mapping luminance, before the simple Reinhard
curve Ld = L / (1 + L) has been applied. The struct does not enforce a
specific unit (cd/m², linear-light normalized, …) — that’s the caller’s
contract. It does enforce non-negativity and finiteness.
Implementations§
Source§impl SceneLuminance
impl SceneLuminance
Sourcepub fn new(l: f64) -> Option<Self>
pub fn new(l: f64) -> Option<Self>
Construct a scene luminance. Returns None for negative, NaN, or
infinite inputs — none of those are valid linear-light luminance.
Sourcepub fn to_display(self) -> DisplayLuminance
pub fn to_display(self) -> DisplayLuminance
Apply the Reinhard 2002 simple global tone-reproduction curve:
Ld = L / (1 + L)
The result is always in the half-open range [0, 1) for any
finite non-negative L, so the conversion is total.
Source: docs/image/filter/tone-mapping-operators.md §2.2
(the simple form, no white point, no key scaling).
Trait Implementations§
Source§impl Clone for SceneLuminance
impl Clone for SceneLuminance
Source§fn clone(&self) -> SceneLuminance
fn clone(&self) -> SceneLuminance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SceneLuminance
Source§impl Debug for SceneLuminance
impl Debug for SceneLuminance
Source§impl PartialEq for SceneLuminance
impl PartialEq for SceneLuminance
Source§fn eq(&self, other: &SceneLuminance) -> bool
fn eq(&self, other: &SceneLuminance) -> bool
self and other values to be equal, and is used by ==.