pub struct SampledImage<I> { /* private fields */ }
Expand description
An image combined with a sampler in a single value, enabling filtered accesses of the image’s
contents. Corresponds to OpTypeSampledImage
.
The generic type parameter is the underlying image type, written like
SampledImage<Image!(...)>
.
Implementations§
Source§impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32> SampledImage<Image<SampledType, DIM, DEPTH, ARRAYED, { _ }, SAMPLED, FORMAT, COMPONENTS>>
impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32> SampledImage<Image<SampledType, DIM, DEPTH, ARRAYED, { _ }, SAMPLED, FORMAT, COMPONENTS>>
Sourcepub fn sample<F>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>,
) -> SampledType::SampleResultwhere
F: Float,
pub fn sample<F>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>,
) -> SampledType::SampleResultwhere
F: Float,
Sample texels at coord
from the sampled image with an implicit lod.
Sourcepub fn sample_by_lod<F>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>,
lod: f32,
) -> SampledType::SampleResultwhere
F: Float,
pub fn sample_by_lod<F>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>,
lod: f32,
) -> SampledType::SampleResultwhere
F: Float,
Sample texels at coord
from the sampled image with an explicit lod.
Trait Implementations§
Source§impl<I: Clone> Clone for SampledImage<I>
impl<I: Clone> Clone for SampledImage<I>
Source§fn clone(&self) -> SampledImage<I>
fn clone(&self) -> SampledImage<I>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<I: Copy> Copy for SampledImage<I>
Auto Trait Implementations§
impl<I> Freeze for SampledImage<I>where
I: Freeze,
impl<I> RefUnwindSafe for SampledImage<I>where
I: RefUnwindSafe,
impl<I> Send for SampledImage<I>where
I: Send,
impl<I> Sync for SampledImage<I>where
I: Sync,
impl<I> Unpin for SampledImage<I>where
I: Unpin,
impl<I> UnwindSafe for SampledImage<I>where
I: UnwindSafe,
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