pub enum TextureFilterMethod {
Nearest,
Linear,
}Expand description
Hardware-sampler filtering mode for TextureResampler.
Maps directly to wgpu::FilterMode; both the magnification and
minification filters are configured identically.
Variants§
Nearest
Nearest-neighbour sampling — returns the texel closest to the sample coordinate. Produces blocky output but is exact for integer scale factors.
Linear
Bilinear filtering — returns a weighted average of the four texels closest to the sample coordinate. This is the primary use case for the hardware sampler path.
Implementations§
Source§impl TextureFilterMethod
impl TextureFilterMethod
Sourcepub fn wgpu_filter(&self) -> FilterMode
pub fn wgpu_filter(&self) -> FilterMode
Returns the wgpu equivalent of this filter mode.
The same value is used for both magnification and minification filters
in TextureResampler::new.
Trait Implementations§
Source§impl Clone for TextureFilterMethod
impl Clone for TextureFilterMethod
Source§fn clone(&self) -> TextureFilterMethod
fn clone(&self) -> TextureFilterMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextureFilterMethod
Source§impl Debug for TextureFilterMethod
impl Debug for TextureFilterMethod
impl Eq for TextureFilterMethod
Source§impl PartialEq for TextureFilterMethod
impl PartialEq for TextureFilterMethod
Source§fn eq(&self, other: &TextureFilterMethod) -> bool
fn eq(&self, other: &TextureFilterMethod) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextureFilterMethod
Auto Trait Implementations§
impl Freeze for TextureFilterMethod
impl RefUnwindSafe for TextureFilterMethod
impl Send for TextureFilterMethod
impl Sync for TextureFilterMethod
impl Unpin for TextureFilterMethod
impl UnsafeUnpin for TextureFilterMethod
impl UnwindSafe for TextureFilterMethod
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.