[−][src]Struct web_glitz::image::sampler::ShadowSampler
Samples depth values and compares them to a reference value using a CompareFunction.
A shadow sampler can only be used with a texture that uses a depth format or a depth stencil
stencil format. Rather than obtaining a (filtered) texel sample for certain texture coordinates
like a normal Sampler, sampling with a ShadowSampler compares the depth texel values
closest to the sampled coordinates to a reference value using a CompareFunction. The value
returned is a floating point value in the range 0.0..=1.0 where the value signifies the
proportion of the texels that passed the CompareFunction, for example: if no values passed, it
returns 0.0; if all values passed it returns 1.0; if 1 out of 4 samples passed it returns
0.25.
See the documentation for each of the CompareFunction variants for descriptions of how each respective function decides whether or not a texel value passes.
See the documentation for RenderingContext::create_shadow_sampler for details on how to create a ShadowSampler.
Implementations
impl ShadowSampler[src]
pub fn compare(&self) -> CompareFunction[src]
The CompareFunction used by thisShadowSampler.
See type documentation for ShadowSampler and the documentation for CompareFunction for details.
pub fn wrap_s(&self) -> Wrap[src]
The wrapping method that this ShadowSampler uses when sampling a value at coordinates
outside the range 0.0..=1.0 in the S ("width") direction in texture space.
See Wrap for details.
pub fn wrap_t(&self) -> Wrap[src]
The wrapping method that this ShadowSampler uses when sampling a value at coordinates
outside the range 0.0..=1.0 in the T ("height") direction in texture space.
See Wrap for details.
pub fn wrap_r(&self) -> Wrap[src]
The wrapping method that this ShadowSampler uses when sampling a value at coordinates
outside the range 0.0..=1.0 in the R ("depth") direction in texture space.
See Wrap for details.
Trait Implementations
impl Hash for ShadowSampler[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<ShadowSampler> for ShadowSampler[src]
Auto Trait Implementations
impl !RefUnwindSafe for ShadowSampler
impl !Send for ShadowSampler
impl !Sync for ShadowSampler
impl Unpin for ShadowSampler
impl !UnwindSafe for ShadowSampler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<D, T> IntoBuffer<T> for D where
D: Borrow<T> + 'static,
T: Copy + 'static, [src]
D: Borrow<T> + 'static,
T: Copy + 'static,
pub fn into_buffer<Rc>(Self, &Rc, BufferId, UsageHint) -> Buffer<T> where
Rc: RenderingContext + Clone + 'static, [src]
Rc: RenderingContext + Clone + 'static,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,