pub struct ImageSample<R> {
pub texture: R,
pub sampler: R,
pub dim: Dim,
pub coord: [f32; 3],
pub layer: Option<f32>,
pub lod: ImageLod,
pub offset: [i32; 3],
pub gather: Option<u8>,
pub depth_ref: Option<f32>,
pub depth: bool,
}Expand description
A sample of any texture: 1D, 2D, 3D, cube, arrayed, with an offset, a gather or a comparison.
Fields§
§texture: RThe texture sampled: an interface Element or a bind slot, as R says.
sampler: RThe sampler, named the same way.
dim: DimThe texture’s shape.
coord: [f32; 3]The coordinate’s components (1D: x; 2D: x, y; 3D and cube: x, y, z); the rest 0.
layer: Option<f32>An array’s layer, as the program gives it (already rounded and clamped to 0 or more).
lod: ImageLodHow the level of detail is picked.
offset: [i32; 3]The constant texel offset (0 where the program states none).
gather: Option<u8>A gather: the component (0 to 3) whose four texels are returned.
depth_ref: Option<f32>A comparison sample’s reference value.
depth: boolThe texture is a depth texture: the first lane of the result is its (compared) depth.
Trait Implementations§
Source§impl<R: Clone> Clone for ImageSample<R>
impl<R: Clone> Clone for ImageSample<R>
impl<R: Copy> Copy for ImageSample<R>
Auto Trait Implementations§
impl<R> Freeze for ImageSample<R>where
R: Freeze,
impl<R> RefUnwindSafe for ImageSample<R>where
R: RefUnwindSafe,
impl<R> Send for ImageSample<R>where
R: Send,
impl<R> Sync for ImageSample<R>where
R: Sync,
impl<R> Unpin for ImageSample<R>where
R: Unpin,
impl<R> UnsafeUnpin for ImageSample<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for ImageSample<R>where
R: 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