Skip to main content

desaturate

Function desaturate 

Source
pub fn desaturate(rgb: Rgb, saturation: f32) -> Rgb
Expand description

Apply the shared saturation modulation to a sampled color — the canonical CPU definition the WGSL mirrors (see the module docs). 1.0 is unchanged, 0.0 is grayscale, > 1.0 oversaturates.