Trait bevy::render::render_resource::AsBindGroupShaderType

pub trait AsBindGroupShaderType<T>
where 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§

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§