OptionalfragmentOptionalfragmentThe fragment shader source code. This overrides anything set in fragmentKey.
OptionalinitialAn object containing the initial uniform values to set. The keys are the uniform names, and the values are the uniform values. This is used to set up the shader before it is rendered for the first time.
The name of the render node. This is also used for shaderName if not set.
OptionalsetupA function that sets any uniform values that the shader needs. It takes two parameters: setUniform and drawingContext. setUniform is a function (name: string, value: any) => void that you can call to set a uniform value. drawingContext is the current drawing context.
OptionalshaderAdditional snippets to add to the shader. An advanced configuration option. You can use updateShaderConfig to edit these at render time, resulting in different shaders.
OptionalshaderThe name of the shader. This is used as the stub for the internal shader name. If another shader with the same name exists, that will be used instead, so it's best to use a unique name.
OptionalupdateA function that updates the shader configuration. An advanced configuration option. It takes three parameters: drawingContext, gameObject, renderNode. drawingContext is the current drawing context. gameObject is the object which is rendering. renderNode is the ShaderQuad render node which invoked the function.
OptionalvertexThe key of the vertex shader source to use from the shader cache.
OptionalvertexThe vertex shader source code. This overrides anything set in vertexKey.
The key of the fragment shader source to use from the shader cache.