pub struct SamplerState {
pub wrap: [Option<AddressMode>; 3],
pub filters: Filters,
pub max_anisotropy: Option<u8>,
pub compare: Option<Compare>,
pub mip_lod_bias: Option<f32>,
pub border: Option<[f32; 4]>,
pub lod: Option<[f32; 2]>,
}Expand description
A sampler’s state as the source stores it, for a texture slot or a program’s sampler: each part None where the
source states none.
Fields§
§wrap: [Option<AddressMode>; 3]Addressing along u, v and w.
filters: FiltersThe sampler’s filters.
max_anisotropy: Option<u8>The most texels along the axis of anisotropy an anisotropic filter takes (1: none beyond the filters’), where the source states an anisotropic filter.
compare: Option<Compare>The comparison a depth-comparison sampler makes of the reference against the texel, where the sampler is one.
mip_lod_bias: Option<f32>Added to the mip level the hardware computes, where the source states a non-zero bias.
border: Option<[f32; 4]>The colour (red, green, blue, alpha) a coordinate outside the texture reads along an axis addressed
AddressMode::Border, where the source states it.
lod: Option<[f32; 2]>The least and the greatest mip level the sampler reads (the level of detail is clamped to them), where the
source states a range; None is every level the texture has.
Implementations§
Trait Implementations§
Source§impl Clone for SamplerState
impl Clone for SamplerState
Source§fn clone(&self) -> SamplerState
fn clone(&self) -> SamplerState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more