pub struct SamplerCreateInfo(/* private fields */);Implementations§
Source§impl SamplerCreateInfo
impl SamplerCreateInfo
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Initialize by default sampler parameters: Linear Filtering, Repeat addressing, no anisotrophy and no lod biases
pub const unsafe fn from_raw(raw: VkSamplerCreateInfo) -> Self
pub const fn into_raw(self) -> VkSamplerCreateInfo
Sourcepub const fn filter(self, mag: FilterMode, min: FilterMode) -> Self
pub const fn filter(self, mag: FilterMode, min: FilterMode) -> Self
The magnification and the minification filters to apply to lookups.
Default: Magnification=FilterMode::Linear, Minification=FilterMode::Linear
Sourcepub const fn mip_filter(self, f: MipmapFilterMode) -> Self
pub const fn mip_filter(self, f: MipmapFilterMode) -> Self
The mipmap filter to apply to lookups.
Default: MipmapFilterMode::Linear
Sourcepub const fn addressing(
self,
u: AddressingMode,
v: AddressingMode,
w: AddressingMode,
) -> Self
pub const fn addressing( self, u: AddressingMode, v: AddressingMode, w: AddressingMode, ) -> Self
The addressing mode for outside [0..1] range for U, V and W coordinates.
Default: U=AddressingMode::Repeat, V=AddressinMode::Repeat, W=AddressingMode::Repeat
Sourcepub const fn lod_bias(self, bias: f32) -> Self
pub const fn lod_bias(self, bias: f32) -> Self
The bias to be added to mipmap LOD calculation and bias provided by image sampling functions in SPIR-V,
as described in the Level-of-Detail Operation section in Vulkan Specification.
Default: 0.0
Sourcepub const fn max_anisotropy(self, level: Option<f32>) -> Self
pub const fn max_anisotropy(self, level: Option<f32>) -> Self
The anisotropy value clamp. Specifying None switches off the anisotropic filtering
Default: None
Sourcepub const fn comparison(self, op: Option<CompareOp>) -> Self
pub const fn comparison(self, op: Option<CompareOp>) -> Self
The comparison function to apply to fetched data before filtering
as described in the Depth Compare Operation section in Vulkan Specification.
Specifying None switches off the comparison against a reference value during lookups.
Default: None
Sourcepub const fn lod_clamp(self, min_lod: f32, max_lod: f32) -> Self
pub const fn lod_clamp(self, min_lod: f32, max_lod: f32) -> Self
The values used to clamp the computed level-of-detail value,
as described in the Level-of-Detail Operation section in Vulkan Specification.
Default: min_lod=0.0, max_lod=0.0
§Panics
max_lod must be greater than or equal to min_lod
Sourcepub const unsafe fn unnormalized_coordinates(
self,
use_unnormalized: bool,
) -> Self
pub const unsafe fn unnormalized_coordinates( self, use_unnormalized: bool, ) -> Self
Whether to use unnormalized or normalized texel coordinates to address texels of the image.
Default: false
§Safety
User must meet the constraints as described in the “Valid Usage” section in the VkSamplerCreateInfo manual page
Trait Implementations§
Source§impl Clone for SamplerCreateInfo
impl Clone for SamplerCreateInfo
Source§fn clone(&self) -> SamplerCreateInfo
fn clone(&self) -> SamplerCreateInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more