Phaser API Documentation

  Version: 
setUniform1(setter, name, value1, [skipCheck])

Description:

Sets the given uniform value/s based on the name and GL function.

This method is called internally by other methods such as set1f and set3iv.

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.

Parameters:

name type arguments Default description
setter function

The GL function to call.

name string

The name of the uniform to set.

value1 boolean | number | Array.<number> | Float32Array

The new value of the uniform.

skipCheck boolean <optional> false

Skip the value comparison?

Returns:
Description:

This WebGLShader instance.

Since: 3.50.0