Hacker News new | past | comments | ask | show | jobs | submit login

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?



More than possible, it's common as an attack: cryptojacking.


You can already mine coins from your browser today

https://coinwebmining.com


Yeah 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.


Years 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.


Most modern browsers throttle or suspend JS execution in tabs that don't have focus anyway.


Ah 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.


Visible 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)


It is already possible in WebGL using regular shaders, with textures as buffers.


You can, but my understanding is that they are significantly less performant than using proper compute shaders. Maybe I'm wrong though?


The 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.


I would expect the real problems are the lack of integer operations and random memory access




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: