Struct gfx_hal::image::SamplerDesc [−][src]
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>,
}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: FilterMinification filter method to use.
mag_filter: FilterMagnification filter method to use.
mip_filter: FilterMip filter method to use.
reduction_mode: ReductionModeReduction 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: LodThis 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: BorderColorBorder color is used when one of the wrap modes is set to border.
normalized: boolSpecifies whether the texture coordinates are normalized.
anisotropy_clamp: Option<u8>Anisotropic filtering.
Can be Some(_) only if Features::SAMPLER_ANISOTROPY is enabled.
Implementations
impl SamplerDesc[src]
impl SamplerDesc[src]Trait Implementations
impl Clone for SamplerDesc[src]
impl Clone for SamplerDesc[src]fn clone(&self) -> SamplerDesc[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Eq for SamplerDesc[src]
impl Eq for SamplerDesc[src]impl Hash for SamplerDesc[src]
impl Hash for SamplerDesc[src]impl PartialEq<SamplerDesc> for SamplerDesc[src]
impl PartialEq<SamplerDesc> for SamplerDesc[src]fn eq(&self, other: &SamplerDesc) -> bool[src]
fn ne(&self, other: &SamplerDesc) -> bool[src]
impl StructuralEq for SamplerDesc[src]
impl StructuralEq for SamplerDesc[src]impl StructuralPartialEq for SamplerDesc[src]
impl StructuralPartialEq for SamplerDesc[src]Auto Trait Implementations
impl RefUnwindSafe for SamplerDesc
impl RefUnwindSafe for SamplerDescimpl Send for SamplerDesc
impl Send for SamplerDescimpl Sync for SamplerDesc
impl Sync for SamplerDescimpl Unpin for SamplerDesc
impl Unpin for SamplerDescimpl UnwindSafe for SamplerDesc
impl UnwindSafe for SamplerDesc