Sets a 4i uniform value based on the given name on the currently set shader.
The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene create
or update
method. However, when working within a Shader file
directly, use the WebGLShader
method equivalent instead, to avoid the program
being set.
name | type | arguments | description |
---|---|---|---|
name | string |
The name of the uniform to set. |
|
x | number |
X component of the uniform. |
|
y | number |
Y component of the uniform. |
|
z | number |
Z component of the uniform. |
|
w | number |
W component of the uniform. |
|
shader | Phaser.Renderer.WebGL.WebGLShader | <optional> |
The shader to set the value on. If not given, the |
This WebGLPipeline instance.