bevy_render::render_resource

Trait AsBindGroupShaderType

Source
pub trait AsBindGroupShaderType<T: ShaderType> {
    // Required method
    fn as_bind_group_shader_type(&self, images: &RenderAssets<GpuImage>) -> 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<GpuImage>) -> 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>,