#[repr(u32)]pub enum TexSample {
Linear = 0,
Point = 1,
Anisotropic = 2,
}
Expand description
How does the shader grab pixels from the texture? Or more specifically, how does the shader grab colors between the provided pixels? If you’d like an in-depth explanation of these topics, check out [this exploration of texture filtering] https://medium.com/@bgolus/sharper-mipmapping-using-shader-based-supersampling-ed7aadb47bec by graphics wizard Ben Golus. https://stereokit.net/Pages/StereoKit/TexSample.html
see also Tex
Variants§
Linear = 0
Use a linear blend between adjacent pixels, this creates a smooth, blurry look when texture resolution is too low.
Point = 1
Choose the nearest pixel’s color! This makes your texture look like pixel art if you’re too close.
Anisotropic = 2
This helps reduce texture blurriness when a surface is viewed at an extreme angle!
Trait Implementations§
impl Copy for TexSample
impl Eq for TexSample
impl StructuralPartialEq for TexSample
Auto Trait Implementations§
impl Freeze for TexSample
impl RefUnwindSafe for TexSample
impl Send for TexSample
impl Sync for TexSample
impl Unpin for TexSample
impl UnwindSafe for TexSample
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.