pub struct Sampler {
pub address_mode_u: AddressMode,
pub address_mode_v: AddressMode,
pub address_mode_w: AddressMode,
pub min_filter: FilterMode,
pub mag_filter: FilterMode,
pub mip_filter: FilterMode,
pub mipmaps: bool,
}Expand description
See SamplerFlags.
Fields§
§address_mode_u: AddressModeAddressing for the U or S texture coordinate.
address_mode_v: AddressModeAddressing for the V or T texture coordinate.
address_mode_w: AddressModeAddressing for the W or R texture coordinate.
min_filter: FilterMode§mag_filter: FilterMode§mip_filter: FilterMode§mipmaps: boolEnables rendering mipmaps past the base mip when true.
Implementations§
Source§impl Sampler
impl Sampler
Sourcepub fn lod_max_clamp(&self) -> f32
pub fn lod_max_clamp(&self) -> f32
The highest rendered texture mipmap LOD.
Sourcepub fn anisotropic_filtering(&self) -> bool
pub fn anisotropic_filtering(&self) -> bool
Returns true if the sampler uses anisotropic filtering.
This is set to 4x in game.
Trait Implementations§
Source§impl From<SamplerFlags> for Sampler
impl From<SamplerFlags> for Sampler
Source§fn from(flags: SamplerFlags) -> Self
fn from(flags: SamplerFlags) -> Self
Converts to this type from the input type.
impl Eq for Sampler
impl StructuralPartialEq for Sampler
Auto Trait Implementations§
impl Freeze for Sampler
impl RefUnwindSafe for Sampler
impl Send for Sampler
impl Sync for Sampler
impl Unpin for Sampler
impl UnwindSafe for Sampler
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§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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more