Skip to main content

Module material

Module material 

Source

Structs§

GPUMaterial
A material uploaded to the GPU: a render pipeline plus the bind group layout entries it expects, ready for a GPUMaterialInstance to bind actual resources against.
MaterialDescriptor
Describes a render pipeline + its own bind group, the source type GPUMaterial is built from via build_material. Start from MaterialDescriptor::default() and override only the fields that differ from a plain opaque material with no depth testing.
MaterialPlugin
Registers the GPUMaterial asset pipeline (Assets<MaterialDescriptor>ProcessedAssets<GPUMaterial>). Included by WGPUPlugin; add directly only if you’re assembling the wgpu module’s plugins by hand.

Constants§

DEFAULT_TARGET
A single opaque Rgba8Unorm color target with no blending — a ready-made value for MaterialDescriptor::targets when you don’t need anything more specific. Not applied automatically by Default (which leaves targets empty, since the right format usually depends on the surface/render target), so use it explicitly: targets: DEFAULT_TARGET.to_vec().

Functions§

build_material
Builds a render pipeline and its own bind group layout from desc.