HACKER Q&A
📣 tikkun

What might be some of the first popular products made using WebGPU?


I still don't quite get why it's a big deal.

My current understanding:

* Easier to make games and visualizations in the browser (WebGL alternative)

* An alternative for desktop apps that need to be GPU powered but don't require all the power of CUDA (CUDA alternative)

What cool things are we likely to see built with WebGPU that either weren't possible or were really difficult to make without it?

See this comment thread: https://news.ycombinator.com/item?id=35803054


  👤 PaulHoule Accepted Answer ✓
I make red-cyan anaglyph images

https://en.wikipedia.org/wiki/Anaglyph_3D

the image processing is something that can be done easily with a shader since you blend certain colors from the right image with certain colors of the left image. There are various reasons why this is good to do on the client device, for instance it is usually necessary to shift the images horizontally a bit to control the depth relative to the screen, doing it on the client means the end user can twist this knob.

Wide color gamut screens are common these days (my iPad and a Dell monitor I have) and these have a green primary that is more saturated than the green primary of sRGB so if you ask for (0,180,0) you really get something like (16,176,16) so a little bit of the green shows through your red filter which is really annoying.

If I process the images ahead of time I can serve up a wide gamut image and really get a pure green, but WebGL can only render in the sRGB color space. WebGPU can, on the other hand, render in a wide gamut space which is great for my application.