updateUniforms method
Writes the standard uniforms to a FragmentShader.
Sets uniform values in the following order:
- Index 0: time (float) — elapsed seconds
- Index 1: intensity (float) — effect strength 0.0–1.0
- Index 2: pointerPosition.dx (float) — normalized X
- Index 3: pointerPosition.dy (float) — normalized Y
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
}