pub struct PostSettings {}Expand description
Screen-space effects applied after the scene is drawn. 0 turns an effect off.
Fields§
§bloom: f32Glow around bright areas.
bloom_threshold: f32Brightness above which bloom starts (0..2).
bloom_radius: f32Size of the bloom halo, 0.5..4.
lens_flare: f32Lens flare: ghost images and streaks from very bright lights and the sun.
blur: f32Full-screen gaussian-style blur strength (menus, underwater, damage).
motion_blur: f32Blur along camera motion; follows how fast the camera turns and moves.
vignette: f32Darkening towards the screen corners.
chromatic_aberration: f32Colour fringing towards the corners (cheap lens look).
film_grain: f32Animated film grain.
sharpen: f32Sharpening of fine detail.
antialias: f32Edge smoothing (FXAA) on top of MSAA: removes stair steps on thin geometry, cut-out leaves and sharp procedural patterns. 0 = off, 1 = full.
tint: [f32; 3]Tint multiplied over the final picture (linear RGB), white = none.
effects: Vec<PostEffect>Custom shader effects, applied in order after the built-in ones.
Implementations§
Source§impl PostSettings
impl PostSettings
Sourcepub fn any_custom(&self) -> bool
pub fn any_custom(&self) -> bool
Whether any custom shader effect is switched on.
Sourcepub fn any_builtin(&self) -> bool
pub fn any_builtin(&self) -> bool
Whether any built-in effect (bloom, blur, tint…) is on.
Trait Implementations§
Source§impl Clone for PostSettings
impl Clone for PostSettings
Source§fn clone(&self) -> PostSettings
fn clone(&self) -> PostSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PostSettings
impl Debug for PostSettings
Source§impl Default for PostSettings
impl Default for PostSettings
Source§impl<'de> Deserialize<'de> for PostSettingswhere
PostSettings: Default,
impl<'de> Deserialize<'de> for PostSettingswhere
PostSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PostSettings
impl PartialEq for PostSettings
Source§impl Serialize for PostSettings
impl Serialize for PostSettings
impl StructuralPartialEq for PostSettings
Auto Trait Implementations§
impl Freeze for PostSettings
impl RefUnwindSafe for PostSettings
impl Send for PostSettings
impl Sync for PostSettings
impl Unpin for PostSettings
impl UnsafeUnpin for PostSettings
impl UnwindSafe for PostSettings
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 moreimpl<T> MaybeSync for T
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.