Struct bedrock::resources::SamplerBuilder
[−]
[src]
pub struct SamplerBuilder(_);
Builder object for constructing the sampler object
Methods
impl SamplerBuilder
[src]
pub fn new() -> Self
[src]
pub fn filter(&mut self, mag: FilterMode, min: FilterMode) -> &mut Self
[src]
The magnification and the minification filters to apply to lookups.
Default: Magnification=FilterMode::Linear
, Minification=FilterMode::Linear
pub fn mip_filter(&mut self, f: MipmapFilterMode) -> &mut Self
[src]
The mipmap filter to apply to lookups.
Default: MipmapFilterMode::Linear
pub fn addressing(
&mut self,
u: AddressingMode,
v: AddressingMode,
w: AddressingMode
) -> &mut Self
[src]
&mut self,
u: AddressingMode,
v: AddressingMode,
w: AddressingMode
) -> &mut 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
pub fn lod_bias(&mut self, bias: f32) -> &mut Self
[src]
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
pub fn max_anisotropy(&mut self, level: Option<f32>) -> &mut Self
[src]
The anisotropy value clamp. Specifying None
switches off the anisotropic filtering
Default: None
pub fn comparison(&mut self, op: Option<CompareOp>) -> &mut Self
[src]
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
pub fn lod_clamp(&mut self, min_lod: f32, max_lod: f32) -> &mut Self
[src]
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
pub unsafe fn unnormalized_coordinates(
&mut self,
use_unnormalized: bool
) -> &mut Self
[src]
&mut self,
use_unnormalized: bool
) -> &mut 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