pub struct ToneMappingConfig {
pub operator: ToneMapOperator,
pub peak_brightness: f32,
pub white_point: f32,
pub saturation_correction: f32,
pub exposure: f32,
pub knee_start: f32,
}Expand description
Configuration for HdrToneMapper.
Use ToneMappingConfig::builder() for ergonomic construction.
Fields§
§operator: ToneMapOperatorTone-mapping operator to apply.
peak_brightness: f32Peak scene-referred brightness of the HDR input, in nits.
For HDR10 content this is typically 1 000 – 4 000 nits. Defaults to 1 000 nits.
white_point: f32Scene white point in nits — the luminance that should map to SDR white (100 nits).
Defaults to 203 nits (ITU-R BT.2408 reference diffuse white).
saturation_correction: f32Multiplicative saturation correction applied in linear RGB after tone mapping.
1.0 = neutral. Values > 1 boost saturation, < 1 desaturate. Typical useful range: 0.5 – 2.0. Defaults to 1.0.
exposure: f32Exposure pre-gain (linear multiplier applied before the tone curve).
1.0 = no adjustment. Use values < 1.0 to darken / protect highlights.
knee_start: f32Soft-knee start, as a fraction of peak_brightness (0.0 → disabled).
When > 0, a smooth cosine blend replaces the hard transition at the shoulder, reducing clipping artefacts. Defaults to 0.0 (off).
Implementations§
Source§impl ToneMappingConfig
impl ToneMappingConfig
Sourcepub fn builder() -> ToneMappingConfigBuilder
pub fn builder() -> ToneMappingConfigBuilder
Create a builder for ergonomic configuration.
Trait Implementations§
Source§impl Clone for ToneMappingConfig
impl Clone for ToneMappingConfig
Source§fn clone(&self) -> ToneMappingConfig
fn clone(&self) -> ToneMappingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToneMappingConfig
impl Debug for ToneMappingConfig
Auto Trait Implementations§
impl Freeze for ToneMappingConfig
impl RefUnwindSafe for ToneMappingConfig
impl Send for ToneMappingConfig
impl Sync for ToneMappingConfig
impl Unpin for ToneMappingConfig
impl UnsafeUnpin for ToneMappingConfig
impl UnwindSafe for ToneMappingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more