AdvancedShader bits for the WebGL (GLSL) backend
Shader bits for the WebGPU (WGSL) backend
OptionalincludeOptionalincludeWhich output each location writes, by name; see ShaderDescriptorOptions#outputLocations
OptionaloverridesValues for the bits' specialization constants; see ShaderDescriptorOptions#overrides
OptionaltemplateCustom shader template; see ShaderDescriptorOptions#template
Replaces every field from options, as the constructor would; a field left out goes back to
its default
The new descriptor contents
This descriptor, for chaining
The ShaderBits a shader is built from, per backend, with its template and overrides
A material's
descriptoroption sets the bits of its main shader. Itspassesoption gives an extra render pass, such as an outline, a descriptor of its own, keyed by pass name, as options or as a built descriptor. The renderer adds the bits a mesh needs, such as skinning, so a material lists only its own.Example