HTML 5 and GPGPU

As we know, many HTML 5 handlers use the GPU to draw canvas elements. I am interested in using this feature to force the GPU to use it for GPGPU. There are probably no GPGPU built-in functions in the canvas API or HTML 5, but what about hacking this?

I was thinking of using something like a texture (2D or 3D array) with the values ​​that need to be processed, and then ask the canvas element to perform some operation on this matrix. This operation should be a function that I can somehow send to the canvas element. Then we have a browser based GPGPU.

Is this possible? What do you think? Do you have any other ideas on how to implement this?

+3
source share
2 answers

There is a WebCL standard that is created specifically to give Javascripts running in the browser access to the GPGPU processing power (if the client has any), however, the list of existing implementations is quite short.

Successful attempts to use the power of the GPU for universal computing were long before (and lead to) the emergence of CUDA, OpenCL and similar GPGPUs. This is a good tutorial here, and I think it portes to WebGL (which has much wider support than WebCL). See @MikkoOhtamaa answer for a good introductory article on WebGL itself

+3
source

All Articles