Skip to main content

Module material

Module material 

Source

Structs§

BlendComponent
One color or alpha blend equation — mirrors wgpu::BlendComponent.
BlendState
Blend state of a color target — mirrors wgpu::BlendState.
ColorTargetState
Describes the color state of a render pipeline — mirrors wgpu::ColorTargetState.
DepthBiasState
Depth bias (“polygon offset”) state — mirrors wgpu::DepthBiasState. Defaults to disabled (all zero).
DepthStencilState
Depth/stencil state of a render pipeline — mirrors wgpu::DepthStencilState.
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.
RenderPipeline
A wgpu::RenderPipeline, opaque — built only via build_material/ GPUMaterial’s Asset::upload. Bind it against a RenderPass via RenderPass::set_pipeline; there’s no way to reach the underlying wgpu::RenderPipeline from outside this crate.
StencilFaceState
Per-face stencil test/operation state — mirrors wgpu::StencilFaceState. If you’re not using stencil testing, leave this as Self::IGNORE (the Default).
StencilState
Full stencil test state — mirrors wgpu::StencilState. Defaults to disabled (both faces StencilFaceState::IGNORE, zero masks).

Enums§

BlendFactor
Color/alpha blend factor — mirrors wgpu::BlendFactor.
BlendOperation
Color/alpha blend operation — mirrors wgpu::BlendOperation.
CompareFunction
Comparison function used for depth/stencil operations — mirrors wgpu::CompareFunction.
Face
Face of a vertex considered for culling — mirrors wgpu::Face.
PolygonMode
Rasterizer polygon mode — mirrors wgpu::PolygonMode.
StencilOperation
Operation performed on the stencil value — mirrors wgpu::StencilOperation.

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.