Sets a property of a uniform already present on this shader.
To modify the value of a uniform such as a 1f or 1i use the value
property directly:
shader.setUniform('size.value', 16);
You can use dot notation to access deeper values, for example:
shader.setUniform('resolution.value.x', 512);
The change to the uniform will take effect the next time the shader is rendered.
name | type | description |
---|---|---|
key | string |
The key of the uniform to modify. Use dots for deep properties, i.e. |
value | any |
The value to set into the uniform. |
This Shader instance.