    const halfClipHeight = size / gl.canvas.height;
    
    const left   = x - halfClipWidth;
    const right  = x + halfClipWidth;
    const top    = y + halfClipHeight;
    const bottom = y - halfClipHeight;
    
    const hit = cx >= left && cx <= right &&
                cy >= bottom && cy <= top;    
    
    gl.vertexAttrib2f(posLoc, x, y);
    gl.vertexAttrib1f(sizeLoc, size);
    gl.vertexAttrib4fv(colorLoc, hit ? [1, 0, 0, 1] : color);
    gl.drawArrays(gl.POINTS, 0, 1);
  }
}

render();

gl.canva