51 ms·
GLSL isn't that much different syntax that Javascript. If you write it directly you get the fun of using types. And WebGL2's support of GLSL ES 3.0 brings featu
by numtel 8y ago
GLSL isn't that much different syntax that Javascript. If you write it directly you get the fun of using types. And WebGL2's support of GLSL ES 3.0 brings features that make it much more handy for compute operations like bitwise operators. It's really not that complicated to write a compute function without any kind of library. Just throw up 2 triangles that cover the output and scale your canvas to the match the number of pixels you want to each 32 bits of output.
See my proof of work generator for the Nano currency that implements the Blake2B hash using these techniques: https://github.com/numtel/nano-webgl-pow https://github.com/numtel/nano-webgl-pow
Send data in as an array of integers on a uniform then receive data out as a bitmap encoded how you please.