pub trait AsBindGroupShaderType<T: ShaderType> {
    // Required method
    fn as_bind_group_shader_type(&self, images: &RenderAssets<Image>) -> T;
}
Expand description

Converts a value to a ShaderType for use in a bind group. This is automatically implemented for references that implement Into. Generally normal Into / From impls should be preferred, but sometimes additional runtime metadata is required. This exists largely to make some AsBindGroup use cases easier.

Required Methods§

source

fn as_bind_group_shader_type(&self, images: &RenderAssets<Image>) -> T

Return the T ShaderType for self. When used in AsBindGroup derives, it is safe to assume that all images in self exist.

Implementors§

source§

impl<T, U: ShaderType> AsBindGroupShaderType<U> for T
where for<'a> &'a T: Into<U>,