3 ms·
I've also used this for a few months. Here's some things that might bite you: - Minification: The JS code is transpiled at runtime and there's some subtle erro
by tppiotrowski 5y ago
I've also used this for a few months. Here's some things that might bite you:
- Minification: The JS code is transpiled at runtime and there's some subtle errors that can occur once you minify your code
- Performance: Each time you pass a JS array into GPU land, it's copying the data into a texture. If you want to do repeated calculations on the same data you should not be passing the arrays in each time because CPU/GPU data transfer will become a performance bottleneck.
- Math.atan2: the implementation is incorrect and I burned a few days because of it. I PR'ed the fix a few months ago but the library maintainer no longer seems active.
It's an awesome library. I write mostly GLSL now, but I still will write the initial algorithm and transpile is using GPU.js and then tweak the output accordingly.