Live data from Hacker News

Real-Time Ray-Tracing in WebGPU

maierfelix.github.io

1–10 of 32 posts

Re: Real-Time Ray-Tracing in WebGPU

#2
>>> Recently I began adapting an unofficial Ray-Tracing extension for Dawn, which is the WebGPU implementation for Chromium

Wow, very impressive! I believe this is only available for MacOS Chrome Canary, with enable-unsafe-webgpu flags toggled on. But we are starting to see more example code.

https://github.com/tsherif/webgpu-examples

This is the first specific RTX target engine I've seen so far though. Starting to feel like the future with full time real-time hardware rendering capabilities in the browser ;)

Do you mind my asking what you plan to build with it?

Re: Real-Time Ray-Tracing in WebGPU

#4
post #2

>>> Recently I began adapting an unofficial Ray-Tracing extension for Dawn, which is the WebGPU implementation for Chromium Wow, very impressive! I believe this is only available for MacOS Chrome Canary, with enable-unsafe-webgpu flags toggled on. But we are starting to see more example code. https://github.com/tsherif/webgpu-examples This is the first specific RTX target engine I've seen so far though. Starting to f…

Hey thanks for you comment.

The Ray-Tracing Extension is currently only available for Windows and Linux.

My next plan is to implement the extension into Dawn's D3D12 backend, so I can build chromium with my Dawn fork and have Ray-Tracing available directly in the browser (at least for myself) :)

Re: Real-Time Ray-Tracing in WebGPU

#5
I read Practical Parallel Rendering (1st Edition: 2002) quite a long time ago, on someone's recommendation. There's quite a substantial section on how to build and manage effective job queues that's worth a read even if you don't do any CGI.

But there's also a thesis in there: given that scene descriptions grow in size much faster than screen resolution increases, there should be a tipping point where ray-tracing is more efficient than rasterization. I don't think they expected it to take quite this long though.

Re: Real-Time Ray-Tracing in WebGPU

#6
Is there any good WebGPU tutorials?

I've been wanting to play around with graphics programming for a while and the web is such a perfect platform due to cross platform compatibility and lower barrier for entry.

Re: Real-Time Ray-Tracing in WebGPU

#7
post #6

Is there any good WebGPU tutorials? I've been wanting to play around with graphics programming for a while and the web is such a perfect platform due to cross platform compatibility and lower barrier for entry.

It's barely got any support ATM.

https://github.com/gpuweb/gpuweb/wiki/Implementation-Status

I doubt you'll see a lot of good tutorials for it until you start seeing it land in stable versions of browser (or even nightly builds tbh).

While starting to show it's age, WebGL should have a lot of tutorials and you can start working with it today.

Re: Real-Time Ray-Tracing in WebGPU

#8
post #7
post #6

Is there any good WebGPU tutorials? I've been wanting to play around with graphics programming for a while and the web is such a perfect platform due to cross platform compatibility and lower barrier for entry.

It's barely got any support ATM. https://github.com/gpuweb/gpuweb/wiki/Implementation-Status I doubt you'll see a lot of good tutorials for it until you start seeing it land in stable versions of browser (or even nightly builds tbh). While starting to show it's age, WebGL should have a lot of tutorials and you can start working with it today.

I wonder if people will use WebGPU directly or use a higher level framework/library such as Babylon? Looks like it has support for it but doesn't seem everything is supported yet but haven't personally played with it.

Re: Real-Time Ray-Tracing in WebGPU

#9
Hey, I really appreciate your work on these bindings. I have done a lot of work with Metal on iOS, and found it frustrating to start over from scratch when trying to combine graphics and deep learning (CUDA on Linux). It would be awesome to see a future where you can write high-performance GPU-driven apps in a cross-platform way with js/webgpu/wasm and slap in platform-specific UI, without bundling all of Unreal or Unity. Running in a browser would be an optional convenience.

Anecdotally, I was trying connect PyTorch's CUDA tensors to the GL textures that Electron/Chrome uses to render in a Canvas without going through CPU memory, but couldn't figure out where to inject my code. Chromium's GPU code is quite a maze. Perhaps a smarter person will be able to accomplish that.

Re: Real-Time Ray-Tracing in WebGPU

#10
post #9

Hey, I really appreciate your work on these bindings. I have done a lot of work with Metal on iOS, and found it frustrating to start over from scratch when trying to combine graphics and deep learning (CUDA on Linux). It would be awesome to see a future where you can write high-performance GPU-driven apps in a cross-platform way with js/webgpu/wasm and slap in platform-specific UI, without bundling all of Unreal or U…

Have you tried tensorflow.js?
Post reply on HN