Phaser API Documentation

set4i(name, x, y, z, w)


Sets a 4i uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the WebGL Renderer, if it isn't already. It also sets this shader as being the current one within the pipeline it belongs to.


name type 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


This WebGLShader instance.

Since: 3.50.0