Live data from Hacker News

WebGPU – All of the cores, none of the canvas

surma.dev

11–20 of 54 posts

Re: WebGPU – All of the cores, none of the canvas

#11
post #6

I'm a graphics programmer who has quite a bit of experience with WebGL, and (disclaimer) I've also contributed to the WebGPU spec. > Quite honestly, I have no idea how ThreeJS manages to be so robust, but it does manage somehow. > To be clear, me not being able to internalize WebGL is probably a shortcoming of my own. People smarter than me have been able to build amazing stuff with WebGL (and OpenGL outside the web)…

That is what I hate on Khronos APIs, it is almost a rite of passage into adulthood to create our own mini-engine on top of their APIs to make them usable.

I already have my toolbox, but that doesn't mean I am fine with them being like that.

Re: WebGPU – All of the cores, none of the canvas

#12
post #6

I'm a graphics programmer who has quite a bit of experience with WebGL, and (disclaimer) I've also contributed to the WebGPU spec. > Quite honestly, I have no idea how ThreeJS manages to be so robust, but it does manage somehow. > To be clear, me not being able to internalize WebGL is probably a shortcoming of my own. People smarter than me have been able to build amazing stuff with WebGL (and OpenGL outside the web)…

if you any suggestion about articles to read about wgpu plz share. I kind of struggle to find good articles with good examples for beginners to get started with wgpu

Re: WebGPU – All of the cores, none of the canvas

#14
post #12
post #6

I'm a graphics programmer who has quite a bit of experience with WebGL, and (disclaimer) I've also contributed to the WebGPU spec. > Quite honestly, I have no idea how ThreeJS manages to be so robust, but it does manage somehow. > To be clear, me not being able to internalize WebGL is probably a shortcoming of my own. People smarter than me have been able to build amazing stuff with WebGL (and OpenGL outside the web)…

if you any suggestion about articles to read about wgpu plz share. I kind of struggle to find good articles with good examples for beginners to get started with wgpu

I find chatGPT 4 quite usefull for this, even if he may does some mistake, it can generate little examples and explain all lines

Re: WebGPU – All of the cores, none of the canvas

#15
My disappointment with WebGPU has been limited data type support. I wanted to write some compute stuff with it, but the limitation of not supporting a lot of integer sizes made it undesirable.

Does anyone know if the spec is likely to be revised to add more support over time?

Re: WebGPU – All of the cores, none of the canvas

#16
post #6

I'm a graphics programmer who has quite a bit of experience with WebGL, and (disclaimer) I've also contributed to the WebGPU spec. > Quite honestly, I have no idea how ThreeJS manages to be so robust, but it does manage somehow. > To be clear, me not being able to internalize WebGL is probably a shortcoming of my own. People smarter than me have been able to build amazing stuff with WebGL (and OpenGL outside the web)…

Can you elaborate more on this? It seems interesting > if you are using gl.enable(gl.BLEND) in your core render loop, you have basically already failed.

I'd also be interested in details on this but I assume the gl.enable() API changes fundamental things about the rendering pipeline. It allows enabling things like depth testing and stencil (both involve an extra buffer) and face culling (additional tests after vertex shader). For blending in particular I think it requires the fragment shader to first read the previous value from the frame buffer. Changes this stuff is probably not a trivial operation and requires a lot of communication with the GPU which is slow (just a guess).

If you want to change blending for each draw call you can change the blending function or just return suitable alpha values from the fragment shader.

Re: WebGPU – All of the cores, none of the canvas

#17
post #15

My disappointment with WebGPU has been limited data type support. I wanted to write some compute stuff with it, but the limitation of not supporting a lot of integer sizes made it undesirable. Does anyone know if the spec is likely to be revised to add more support over time?

https://github.com/gpuweb/gpuweb/issues/3620

Re: WebGPU – All of the cores, none of the canvas

#18
post #12
post #6

I'm a graphics programmer who has quite a bit of experience with WebGL, and (disclaimer) I've also contributed to the WebGPU spec. > Quite honestly, I have no idea how ThreeJS manages to be so robust, but it does manage somehow. > To be clear, me not being able to internalize WebGL is probably a shortcoming of my own. People smarter than me have been able to build amazing stuff with WebGL (and OpenGL outside the web)…

if you any suggestion about articles to read about wgpu plz share. I kind of struggle to find good articles with good examples for beginners to get started with wgpu

Have you already been here?

https://webgpufundamentals.org/

https://webgpu.github.io/webgpu-samples

Re: WebGPU – All of the cores, none of the canvas

#19
post #15

My disappointment with WebGPU has been limited data type support. I wanted to write some compute stuff with it, but the limitation of not supporting a lot of integer sizes made it undesirable. Does anyone know if the spec is likely to be revised to add more support over time?

Eventually, but expect a progression rate measured in years.

Re: WebGPU – All of the cores, none of the canvas

#20
post #4

Earlier quoted context omitted.

I think all of these are wrong. > WebRTC is ffmpeg No. WebRTC is a transport protocol for media communications. > Canvas is Skia Skia is a graphics engine you can build a Canvas implementation on top of > WebGL is ANGLE I don't know what ANGLE is, but WebGL is based on OpenGL. As this article says "WebGL’s API is really just OpenGL ES 2.0" > WebCodecs is also ffmpeg Both allow conceptually similar things (low level a…

> > WebTransport is QUIC > No it is an API to expose lower level parts of HTTP/3 to developers. HTTP/3 uses QUIC as a transport protocol, but it is very wrong to say it "is" QUIC. Well, that's the only thing the parent got almost right. (The rest was obvious nonsense, though. I agree.) WebTransport is of course not QUIC. But it allows to use QUIC streams almost directly . There are no "lower parts" of HTTP/3 other th…

I was looking into this but are you sure web transport will expose bidirectional binary quic streams and datagrams to the browser? If so please link so I can start hacking!
Post reply on HN