I am interested in performing some intensive calculations in webgl, so its run on GPU.
Most of the docs speak about how render graphics though.
I am after very simple task: for given image, transform it to grayscale, and find coordinates of local maxima (pixels that are brighter than its neighbours).
I would like to run the 'loops' in webgl shader, but getting out the (x, y) of the local maxima pixels to the javascript world. Is it doable? Whats the best way to do it, so that it performs well by processing pixels in parallel?