Using the Mouse Position in a Shader

Send transformed mouse coordinates to shader

    const x = 2.0 * (mx/canvas.clientWidth) - 1.0;
    const y = -(2.0 * (my/canvas.clientHeight) - 1.0);
    gl.uniform2f(uPos, x, y);