pub enum SamplerKind {
LinearRepeat,
LinearClamp,
LinearClampNoMip,
Nearest,
}Variants§
LinearRepeat
LinearClamp
LinearClampNoMip
Like LinearClamp, but clamped to mip 0 only (lod_min_clamp/
lod_max_clamp both 0.0). Use this when you need to force sampling
the base level regardless of how many mips the texture actually
has — e.g. an environment-map capture pass where blending across
mips would introduce blur you don’t want in the baked result.
Nearest
Implementations§
Source§impl SamplerKind
impl SamplerKind
Sourcepub fn descriptor(&self) -> SamplerDescriptor<'static>
pub fn descriptor(&self) -> SamplerDescriptor<'static>
Pure conversion to a wgpu descriptor. You still call
device.create_sampler(&kind.descriptor()) yourself, in your own
LazyResource::construct — this only fixes the handful of
address-mode/filter combinations so you don’t re-derive them.
Trait Implementations§
Source§impl Clone for SamplerKind
impl Clone for SamplerKind
Source§fn clone(&self) -> SamplerKind
fn clone(&self) -> SamplerKind
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 SamplerKind
impl Eq for SamplerKind
Source§impl Hash for SamplerKind
impl Hash for SamplerKind
Source§impl PartialEq for SamplerKind
impl PartialEq for SamplerKind
impl StructuralPartialEq for SamplerKind
Auto Trait Implementations§
impl Freeze for SamplerKind
impl RefUnwindSafe for SamplerKind
impl Send for SamplerKind
impl Sync for SamplerKind
impl Unpin for SamplerKind
impl UnsafeUnpin for SamplerKind
impl UnwindSafe for SamplerKind
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,
impl<T> Component for T
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.