5 ms·
I think this uses Canvas/WebGL to provoke the GPU into performing calculations behind the scenes. If that's true, I imagine this solution will fall by the waysi
by tenaciousDaniel 5y ago
I think this uses Canvas/WebGL to provoke the GPU into performing calculations behind the scenes. If that's true, I imagine this solution will fall by the wayside as WebGPU becomes production ready.
- manomanomano 5y agoIt's for nodejs
- zamadatix 5y agoYour comment probably got downed more drastically than normal for being a new account but on the off chance you're a legitimate new account that just had an unlucky first comment: It's compatible with both web and Node. In Node it uses https://github.com/stackgl/headless-gl https://github.com/stackgl/headless-gl to provide a WebGL compatible implementation as Node doesn't ship with GPU access out of the box. The project is looking into https://github.com/maierfelix/webgpu https://github.com/maierfelix/webgpu or similar to instead provide Node with a WebGPU compatible implementation. Both require N-API. The tracking issue can be found here for reference https://github.com/gpujs/gpu.js/issues/507 https://github.com/gpujs/gpu.js/issues/507.
- worldsayshi 5y agoI also felt that it could be made clearer on the web page that it works on both node js and the web. Right now it could be interpreted as both or only node.
- dhritzkiv 5y agoSlight correction: headless-gl uses the precursor to N-API: nan, built with node-gyp. Regrettably. Source: I'm the custodian/maintainer of headless-gl
- fulafel 5y agoThese things tend to take a long time to mature. We are just getting to the situation where WebGL 2 carrying the GLES 3.0 feature set works in all browsers (Safari delayed it many years). GLES 3.0 was released in 2012 (edit: fixed year) and WebGL 2 in 2017. But apps take a long time to mature too of course, so good that developers can get a taste of WebGPU already.
- bperson 5y agoI checked, "Get WebGPU as an alternate backend (help wanted)" > We need this [WebGPU] in GPU.js, possibly as a sub-project: https://github.com/maierfelix/webgpu https://github.com/maierfelix/webgpu Once it becomes stable, and well supported and tested, we could possibly make it the default fallback. https://github.com/gpujs/gpu.js/issues/507 https://github.com/gpujs/gpu.js/issues/507
- vegetablepotpie 5y agoIt should. Then again WebCl existed 10 years ago to solve this problem but never took off because you needed vendor support for each device. So hacks like mapping matrix math to textures and back again is much more likely to work on the widest number of devices, which is why you see these libraries. With W3C support, JS GPU programming should be built into web browsers and we shouldn’t need such hacks to build high performance web apps.
- brundolf 5y agoThere's a long tradition on the web of bundling various implementations of an emerging feature under a library that can automatically pick the best one for the platform it's running on. Usually these act as temporary scaffolding until the browser-sanctioned API becomes ubiquitous, at which point they're phased out
- pjmlp 5y agoFrom what I remember Intel failed at least twice to make it happen with compute shaders. First they had a kind of OpenCL plugin, which died when plugins got widespread killed. Then they finally managed to ramp enough quorum to add OpenGL compute shaders to WebGL 2.0, as an extension, just to have Google killing the efforts with "compute on the Web should be done via WebGPU". So now it is time to wait again, until WebGPU actually makes it.
- pjmlp 5y agoWhich looking to the 10 years that took for WebGL 2.0 to finally become available everywhere, and WGSL is still half baked, being production ready is still a couple of years away.