AdvancedOptionalbitsShader bits for the WebGL (GLSL) backend
OptionalbitsShader bits for the WebGPU (WGSL) backend
OptionalincludeWhether the compiler adds the camera's position and matrices in the camera bind group
Set it to match the template: false for one with no camera group. The compile throws when
they disagree. A material's descriptor ignores it and always has them.
OptionalincludeWhether the compiler adds the view-wide values, such as the lights and fog, in the global bind
group
Set false for a template with no global group, or when the bits declare a global group of
their own. A material's descriptor ignores it and always has them.
OptionaloutputWhich of the bits' ShaderBit#outputs each location writes, by name: entry n is
location n, the target's colour attachment n
An output left out never reaches the GPU, and a name no bit declares leaves its attachment
alone. A material's descriptor ignores it, since the engine sets a material shader's
locations. Each distinct list compiles its own shader. A template without the output slots
ignores it.
OptionaloverridesValues for the bits' specialization constants (ShaderOverrideDef), such as
{ OUTLINE_WIDTH: 0.1 }
Each distinct set of values compiles its own shader.
OptionaltemplateCustom shader template
Left out, a material's descriptor uses the engine's material template. A pass's descriptor
has no default and must set one.
Options for a ShaderDescriptor: the ShaderBits a shader is built from
Each backend takes its own list, because a few bits exist for one backend only. Most lists name the same bits.