4 ms·
Naive question here. Since WebGPU offers compute, shouldn't it be possible to create a web app where you can join a mining pool directly from your browser?
by danielvaughn 5y ago
Naive question here. Since WebGPU offers compute, shouldn't it be possible to create a web app where you can join a mining pool directly from your browser?
- pjmlp 5y agoIt is already possible in WebGL using regular shaders, with textures as buffers.
- danielvaughn 5y agoYou can, but my understanding is that they are significantly less performant than using proper compute shaders. Maybe I'm wrong though?
- flohofwoe 5y agoThe more computation happens per 'item/pixel' the less the WebGL-induced overhead should matter, WebGL adds overhead getting the data into and out of the shaders, but the raw pixel- vs compute-shader performance shouldn't differ much.
- kevingadd 5y agoI would expect the real problems are the lack of integer operations and random memory access
- proto-n 5y agoYears back I had the idea of a patreon-like site, where people could support a person/project by keeping a tab open, mining. Nothing like it materialized afaik, guess none of the usual pow algos really shine in browser tabs.
- dljsjr 5y agoMost modern browsers throttle or suspend JS execution in tabs that don't have focus anyway.
- danielvaughn 5y agoAh this is a good point. So it would literally need to be visible, focused, and the computer likely shouldn't enter sleep mode during the mining process. That's a lot of hoops.
- hutzlibu 5y agoVisible is enough. It does not have to be focused. It can mostly also be covered by other (browser) windows, but if it is minimized or in another tab, it gets throttled. That hit me a few times, but ads and malware ruined that for everyone. (and there is no simple permission dialog possible, where you ask the user to allow it)
- gbrown 5y agoMore than possible, it's common as an attack: cryptojacking.
- greggman3 5y agoYou can already mine coins from your browser today https://coinwebmining.com https://coinwebmining.com
- danielvaughn 5y agoYeah true. I guess what I'm wondering is whether explicit support for GPU compute shaders makes it more of a viable product. Supposedly WebGPU is based on the new Vulkan-based API instead of OpenGL, which should allow for much greater performance. I'm not really knowledgeable enough to know for sure, though.