Struct gfx_hal::image::SamplerDesc
source · [−]pub struct SamplerDesc {
pub min_filter: Filter,
pub mag_filter: Filter,
pub mip_filter: Filter,
pub reduction_mode: ReductionMode,
pub wrap_mode: (WrapMode, WrapMode, WrapMode),
pub lod_bias: Lod,
pub lod_range: Range<Lod>,
pub comparison: Option<Comparison>,
pub border: BorderColor,
pub normalized: bool,
pub anisotropy_clamp: Option<u8>,
}
Expand description
Specifies how to sample from an image. These are all the parameters available that alter how the GPU goes from a coordinate in an image to producing an actual value from the texture, including filtering/ scaling, wrap mode, etc.
Fields
min_filter: Filter
Minification filter method to use.
mag_filter: Filter
Magnification filter method to use.
mip_filter: Filter
Mip filter method to use.
reduction_mode: ReductionMode
Reduction mode over the filter.
wrap_mode: (WrapMode, WrapMode, WrapMode)
Wrapping mode for each of the U, V, and W axis (S, T, and R in OpenGL speak).
lod_bias: Lod
This bias is added to every computed mipmap level (N + lod_bias). For example, if it would select mipmap level 2 and lod_bias is 1, it will use mipmap level 3.
lod_range: Range<Lod>
This range is used to clamp LOD level used for sampling.
comparison: Option<Comparison>
Comparison mode, used primary for a shadow map.
border: BorderColor
Border color is used when one of the wrap modes is set to border.
normalized: bool
Specifies whether the texture coordinates are normalized.
anisotropy_clamp: Option<u8>
Anisotropic filtering.
Can be Some(_)
only if Features::SAMPLER_ANISOTROPY
is enabled.
Implementations
sourceimpl SamplerDesc
impl SamplerDesc
Trait Implementations
sourceimpl Clone for SamplerDesc
impl Clone for SamplerDesc
sourcefn clone(&self) -> SamplerDesc
fn clone(&self) -> SamplerDesc
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SamplerDesc
impl Debug for SamplerDesc
sourceimpl Hash for SamplerDesc
impl Hash for SamplerDesc
sourceimpl PartialEq<SamplerDesc> for SamplerDesc
impl PartialEq<SamplerDesc> for SamplerDesc
sourcefn eq(&self, other: &SamplerDesc) -> bool
fn eq(&self, other: &SamplerDesc) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SamplerDesc) -> bool
fn ne(&self, other: &SamplerDesc) -> bool
This method tests for !=
.
impl Eq for SamplerDesc
impl StructuralEq for SamplerDesc
impl StructuralPartialEq for SamplerDesc
Auto Trait Implementations
impl RefUnwindSafe for SamplerDesc
impl Send for SamplerDesc
impl Sync for SamplerDesc
impl Unpin for SamplerDesc
impl UnwindSafe for SamplerDesc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more