pub struct SdfEffects {Show 15 fields
pub outline: bool,
pub outline_color: Vec4,
pub outline_width: f32,
pub shadow: bool,
pub shadow_color: Vec4,
pub shadow_offset: Vec2,
pub shadow_softness: f32,
pub glow: bool,
pub glow_color: Vec4,
pub glow_radius: f32,
pub bold: bool,
pub wave_amplitude: f32,
pub wave_frequency: f32,
pub shake_amount: f32,
pub glitch_intensity: f32,
}Expand description
Per-glyph SDF rendering effects that can be applied in the fragment shader.
Fields§
§outline: boolWhether to render an outline.
outline_color: Vec4Outline color (RGBA).
outline_width: f32Outline width in SDF-space units (0.0 to ~0.2).
shadow: boolWhether to render a drop shadow.
shadow_color: Vec4Shadow color (RGBA).
shadow_offset: Vec2Shadow offset in screen pixels.
shadow_softness: f32Shadow softness (blur radius in SDF-space, 0.0 to ~0.2).
glow: boolWhether to use the distance field as a glow source.
glow_color: Vec4Glow color (RGBA).
glow_radius: f32Glow radius in SDF-space (how far from edge the glow extends).
bold: boolBold mode: shifts the threshold to make glyphs thicker.
wave_amplitude: f32UV distortion effects: wave, shake, glitch.
wave_frequency: f32§shake_amount: f32§glitch_intensity: f32Implementations§
Source§impl SdfEffects
impl SdfEffects
Trait Implementations§
Source§impl Clone for SdfEffects
impl Clone for SdfEffects
Source§impl Debug for SdfEffects
impl Debug for SdfEffects
Auto Trait Implementations§
impl Freeze for SdfEffects
impl RefUnwindSafe for SdfEffects
impl Send for SdfEffects
impl Sync for SdfEffects
impl Unpin for SdfEffects
impl UnsafeUnpin for SdfEffects
impl UnwindSafe for SdfEffects
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.