pub struct SamplerUse {
pub address: [Address; 2],
pub mip_lod_bias: Option<f32>,
}Expand description
What a binding’s sampler gives a texture’s sampling: the addressing along u and v and the level-of-detail bias it states.
Fields§
§address: [Address; 2]The addressing along u and v.
mip_lod_bias: Option<f32>Added to a computed level of detail (Filtering::Trilinear); finite.
Implementations§
Source§impl SamplerUse
impl SamplerUse
Sourcepub fn addressed(address: [Address; 2]) -> SamplerUse
pub fn addressed(address: [Address; 2]) -> SamplerUse
The addressing address and no bias.
Sourcepub fn of(
state: &SamplerState,
unstated: Unstated,
) -> Result<SamplerUse, String>
pub fn of( state: &SamplerState, unstated: Unstated, ) -> Result<SamplerUse, String>
From a binding’s sampler state: its u and v addressing (an unstated axis as unstated says) and its bias.
Border addressing is refused (no source stores the border colour), as is a bias that isn’t finite. Whether an
axis was assumed is SamplerUse::assumed.
Sourcepub fn assumed(state: &SamplerState) -> bool
pub fn assumed(state: &SamplerState) -> bool
Whether state leaves the u or v addressing unstated: what SamplerUse::of took from Unstated.
Trait Implementations§
Source§impl Clone for SamplerUse
impl Clone for SamplerUse
impl Copy for SamplerUse
Source§impl Debug for SamplerUse
impl Debug for SamplerUse
Source§impl PartialEq for SamplerUse
impl PartialEq for SamplerUse
impl StructuralPartialEq for SamplerUse
Auto Trait Implementations§
impl Freeze for SamplerUse
impl RefUnwindSafe for SamplerUse
impl Send for SamplerUse
impl Sync for SamplerUse
impl Unpin for SamplerUse
impl UnsafeUnpin for SamplerUse
impl UnwindSafe for SamplerUse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more