#[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