pub trait ImageWithMethods<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, Params> {
    // Required methods
    fn fetch_with<I>(
        &self,
        coordinate: impl ImageCoordinate<I, DIM, ARRAYED>,
        params: Params
    ) -> SampledType::SampleResult
       where I: Integer;
    fn gather_with<F>(
        &self,
        sampler: Sampler,
        coordinate: impl ImageCoordinate<F, DIM, ARRAYED>,
        component: u32,
        params: Params
    ) -> SampledType::Vec4
       where Self: HasGather,
             F: Float;
    fn sample_with<F>(
        &self,
        sampler: Sampler,
        coord: impl ImageCoordinate<F, DIM, ARRAYED>,
        params: Params
    ) -> SampledType::SampleResult
       where F: Float;
    fn sample_depth_reference_with<F>(
        &self,
        sampler: Sampler,
        coordinate: impl ImageCoordinate<F, DIM, ARRAYED>,
        depth_reference: f32,
        params: Params
    ) -> SampledType
       where F: Float;
    fn sample_with_project_coordinate_with<F>(
        &self,
        sampler: Sampler,
        project_coordinate: impl ImageCoordinate<F, DIM, { _ }>,
        params: Params
    ) -> SampledType::SampleResult
       where F: Float;
    fn sample_depth_reference_with_project_coordinate_with<F>(
        &self,
        sampler: Sampler,
        project_coordinate: impl ImageCoordinate<F, DIM, { _ }>,
        depth_reference: f32,
        params: Params
    ) -> SampledType
       where F: Float;
}
Expand description

Helper trait that defines all *_with methods on an Image that use the extra image operands, such as bias or lod, defined by the SampleParams struct.

Required Methods§

source

fn fetch_with<I>( &self, coordinate: impl ImageCoordinate<I, DIM, ARRAYED>, params: Params ) -> SampledType::SampleResultwhere I: Integer,

Fetch a single texel with a sampler set at compile time

source

fn gather_with<F>( &self, sampler: Sampler, coordinate: impl ImageCoordinate<F, DIM, ARRAYED>, component: u32, params: Params ) -> SampledType::Vec4where Self: HasGather, F: Float,

Gathers the requested component from four texels.

source

fn sample_with<F>( &self, sampler: Sampler, coord: impl ImageCoordinate<F, DIM, ARRAYED>, params: Params ) -> SampledType::SampleResultwhere F: Float,

Sample texels at coord from the image using sampler.

source

fn sample_depth_reference_with<F>( &self, sampler: Sampler, coordinate: impl ImageCoordinate<F, DIM, ARRAYED>, depth_reference: f32, params: Params ) -> SampledTypewhere F: Float,

Sample the image’s depth reference

source

fn sample_with_project_coordinate_with<F>( &self, sampler: Sampler, project_coordinate: impl ImageCoordinate<F, DIM, { _ }>, params: Params ) -> SampledType::SampleResultwhere F: Float,

Sample the image with a project coordinate

source

fn sample_depth_reference_with_project_coordinate_with<F>( &self, sampler: Sampler, project_coordinate: impl ImageCoordinate<F, DIM, { _ }>, depth_reference: f32, params: Params ) -> SampledTypewhere F: Float,

Sample the image’s depth reference with the project coordinate

Implementors§

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, NoneTy, NoneTy, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, G> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, NoneTy, SomeTy<(G, G)>, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, G, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, NoneTy, SomeTy<(G, G)>, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, L> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, SomeTy<L>, NoneTy, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, L, G> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, SomeTy<L>, SomeTy<(G, G)>, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, L, G, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, SomeTy<L>, SomeTy<(G, G)>, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, L, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, SomeTy<L>, NoneTy, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, B, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<SomeTy<B>, NoneTy, NoneTy, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, G> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, NoneTy, SomeTy<(G, G)>, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, G, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, NoneTy, SomeTy<(G, G)>, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, L> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, SomeTy<L>, NoneTy, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, L, G> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, SomeTy<L>, SomeTy<(G, G)>, NoneTy>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, L, G, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, SomeTy<L>, SomeTy<(G, G)>, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, L, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, SomeTy<L>, NoneTy, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>

source§

impl<SampledType: SampleType<FORMAT, COMPONENTS>, const DIM: u32, const DEPTH: u32, const ARRAYED: u32, const MULTISAMPLED: u32, const SAMPLED: u32, const FORMAT: u32, const COMPONENTS: u32, S> ImageWithMethods<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS, SampleParams<NoneTy, NoneTy, NoneTy, SomeTy<S>>> for Image<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>