4 ms·
The important bit is getting the metaball function into the fragment shader. I'm not really a web guy, but I know you can do that with WebGL. For a canvas with
by slavik81 9y ago
The important bit is getting the metaball function into the fragment shader. I'm not really a web guy, but I know you can do that with WebGL.
For a canvas with a more limited API, you can still do it if images are GPU accelerated with a composite mode like "lighter". If that's the case, you can do basically the same thing by first rendering the metaball function to an image once, and then drawing that image for each metaball. Doing it via an image introduces extra aliasing artifacts, but might get around the API limitations.
Edit: I suppose you would still want to find a GPU-accelerated threshold function for the step after that.