pub struct ChromaticParams {
pub enabled: bool,
pub red_offset: f32,
pub blue_offset: f32,
pub green_offset: f32,
pub radial_scale: bool,
pub tangential: f32,
pub spectrum_spread: f32,
pub barrel_distortion: f32,
}Expand description
Chromatic aberration pass parameters.
Fields§
§enabled: bool§red_offset: f32Radial offset amount in UV units for the red channel (0.002 = subtle).
blue_offset: f32Radial offset for the blue channel (usually slightly more than red).
green_offset: f32Green channel offset (usually 0 — green is the reference channel).
radial_scale: boolWhether to scale the offset with distance from screen center (true = realistic lens).
tangential: f32Direction distortion: 0.0 = purely radial, 1.0 = tangential (rotational aberration).
spectrum_spread: f32Fringe color mixing: 0.0 = clean R/G/B, 1.0 = smeared spectrum.
barrel_distortion: f32Barrel distortion applied before chromatic split (0.0 = none, 0.1 = visible).
Implementations§
Source§impl ChromaticParams
impl ChromaticParams
Sourcepub fn cheap_lens() -> Self
pub fn cheap_lens() -> Self
Cheap plastic lens (pronounced aberration at edges).
Sourcepub fn chaos_rift(entropy: f32) -> Self
pub fn chaos_rift(entropy: f32) -> Self
Chaos Rift proximity effect — scales with entropy [0, 1].
Sourcepub fn trauma_shake(trauma: f32) -> Self
pub fn trauma_shake(trauma: f32) -> Self
Trauma shake chromatic (scales with camera trauma [0, 1]).
Trait Implementations§
Source§impl Clone for ChromaticParams
impl Clone for ChromaticParams
Source§fn clone(&self) -> ChromaticParams
fn clone(&self) -> ChromaticParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChromaticParams
impl Debug for ChromaticParams
Auto Trait Implementations§
impl Freeze for ChromaticParams
impl RefUnwindSafe for ChromaticParams
impl Send for ChromaticParams
impl Sync for ChromaticParams
impl Unpin for ChromaticParams
impl UnsafeUnpin for ChromaticParams
impl UnwindSafe for ChromaticParams
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.