updateUniforms method

void updateUniforms(
  1. FragmentShader shader
)

Writes the standard uniforms to a FragmentShader.

Sets uniform values in the following order:

Call this each frame before painting with the shader.

Implementation

void updateUniforms(FragmentShader shader) {
  shader.setFloat(0, time); // uniform 0: time
  shader.setFloat(1, _intensity); // uniform 1: intensity
  shader.setFloat(2, _pointerPosition.dx); // uniform 2: pointerX
  shader.setFloat(3, _pointerPosition.dy); // uniform 3: pointerY
}