Struct spirv_std::image::SampledImage
source · 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>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const SAMPLED: u32, const FORMAT: u32> SampledImage<Image<SampledType, DIM, DEPTH, ARRAYED, { _ }, SAMPLED, FORMAT>>
impl<SampledType: SampleType<FORMAT>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const SAMPLED: u32, const FORMAT: u32> SampledImage<Image<SampledType, DIM, DEPTH, ARRAYED, { _ }, SAMPLED, FORMAT>>
sourcepub unsafe fn sample<F, V>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>
) -> Vwhere
F: Float,
V: Vector<SampledType, 4>,
pub unsafe fn sample<F, V>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>
) -> Vwhere
F: Float,
V: Vector<SampledType, 4>,
Sample texels at coord
from the sampled image with an implicit lod.
Safety
Sampling with a type (S
) that doesn’t match the image’s image format
will result in undefined behaviour.
sourcepub unsafe fn sample_by_lod<F, V>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>,
lod: f32
) -> Vwhere
F: Float,
V: Vector<SampledType, 4>,
pub unsafe fn sample_by_lod<F, V>(
&self,
coord: impl ImageCoordinate<F, DIM, ARRAYED>,
lod: f32
) -> Vwhere
F: Float,
V: Vector<SampledType, 4>,
Sample texels at coord
from the sampled image with an explicit lod.
Safety
Sampling with a type (S
) that doesn’t match the image’s image format
will result in undefined behaviour.
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 more