pub struct DistortionParams {
pub enabled: bool,
pub scale: f32,
pub chromatic_split: f32,
pub max_offset: f32,
pub time_scale: f32,
pub edge_fade: bool,
pub edge_fade_width: f32,
}Expand description
Distortion pass parameters.
Fields§
§enabled: bool§scale: f32Global distortion scale multiplier (1.0 = normal, 0.0 = disabled).
chromatic_split: f32Chromatic splitting of distorted UV offsets (0.0 = mono, 1.0 = full RGB split).
max_offset: f32Maximum distortion offset in UV units (clamp for safety).
time_scale: f32Time scale for animated distortions (1.0 = realtime, 0.5 = slow motion).
edge_fade: boolWhether to apply a subtle edge-fade to prevent border artifacts.
edge_fade_width: f32Edge fade width in UV units (0.05 = 5% of screen from each edge).
Implementations§
Source§impl DistortionParams
impl DistortionParams
Sourcepub fn heat_shimmer() -> Self
pub fn heat_shimmer() -> Self
Subtle heat shimmer (great for desert levels or forges).
Sourcepub fn gravity_lens() -> Self
pub fn gravity_lens() -> Self
Strong gravitational lensing (black hole or Gravity Nexus).
Sourcepub fn chaos_rift(entropy: f32) -> Self
pub fn chaos_rift(entropy: f32) -> Self
Chaos Rift distortion (high entropy, chaotic, colorful).
Trait Implementations§
Source§impl Clone for DistortionParams
impl Clone for DistortionParams
Source§fn clone(&self) -> DistortionParams
fn clone(&self) -> DistortionParams
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 DistortionParams
impl Debug for DistortionParams
Auto Trait Implementations§
impl Freeze for DistortionParams
impl RefUnwindSafe for DistortionParams
impl Send for DistortionParams
impl Sync for DistortionParams
impl Unpin for DistortionParams
impl UnsafeUnpin for DistortionParams
impl UnwindSafe for DistortionParams
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.