API

Type Alias ShaderAttributeFormats

ShaderAttributeFormats: Partial<Record<ShaderAttributeName, GPUVertexFormat>>

Per-attribute vertex FORMAT overrides, applied with setShaderAttributeFormats. Omitted attributes keep the canonical format.

A format is part of the shader's own signature — it decides the WGSL type of input.<attribute> — so it belongs to the material. WHERE those bytes sit (byte stride and per-attribute offset) is a property of the geometry and lives on the mesh, as MeshGPU._vbLayout. Keeping the two apart is what lets one material draw both a tightly-packed CPU mesh and an interleaved GPU-produced one.