#[non_exhaustive]pub enum SamplerPreset {
Nearest,
Linear,
Anisotropic,
Comparison,
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Nearest
Nearest-neighbor filtering, clamp to edge. Best for pixel art and textures that should not be interpolated.
Linear
Bilinear filtering, clamp to edge. General-purpose filtering for smooth texture sampling.
Anisotropic
Anisotropic filtering, clamp to edge. Best quality for 3D surfaces viewed at oblique angles. Uses the maximum anisotropy level supported by the device.
Comparison
Comparison sampler for shadow mapping.
Uses LessEqual comparison with linear filtering.
Trait Implementations§
Source§impl Clone for SamplerPreset
impl Clone for SamplerPreset
Source§fn clone(&self) -> SamplerPreset
fn clone(&self) -> SamplerPreset
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 SamplerPreset
impl Debug for SamplerPreset
Source§impl Hash for SamplerPreset
impl Hash for SamplerPreset
Source§impl PartialEq for SamplerPreset
impl PartialEq for SamplerPreset
impl Copy for SamplerPreset
impl Eq for SamplerPreset
impl StructuralPartialEq for SamplerPreset
Auto Trait Implementations§
impl Freeze for SamplerPreset
impl RefUnwindSafe for SamplerPreset
impl Send for SamplerPreset
impl Sync for SamplerPreset
impl Unpin for SamplerPreset
impl UnsafeUnpin for SamplerPreset
impl UnwindSafe for SamplerPreset
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.