AdvancedA dictionary of constants to set on the shader. Keys should match the constant names in the WGSL shader.
ReadonlydataThe dictionary of constants to override.
ReadonlyidThe unique ID of the override configuration. Used for efficient caching.
StaticfromCreates a ShaderOverrides instance from a plain object or existing instance.
The overrides to convert.
A ShaderOverrides instance.
A specialized class that handles the caching and identification of shader overrides. Shader overrides are used to inject constants into a shader pipeline, allowing for powerful customization without the need for recompiling the shader source.
This class ensures that override configurations are unique and immutable, allowing the renderer to efficiently cache pipelines based on these configurations.