This patch adds hardware accelerated Ray tracing to WebGPU in Chromium using Dawn RT, which is a Fork of Chromium's WebGPU implementation. Both Windows and Linux are supported.
When using the Chromium RT build, you can browse this online demo, which is an interactive path tracer.
To enable WebGPU, go to chrome://flags/
and set Unsafe WebGPU
to enabled.
On Windows, if you get warnings that DXC/DXIL isn't available, run chromium with --disable-gpu-sandbox
.
Clone Chromium (revision: b4332347b130a3c912aa0eba1583cb7db071b1e6).
Run:
fetch chromium
gclient sync
gn gen out/Default --args="is_component_build=true is_debug=false use_dawn=true symbol_level=1 blink_symbol_level=1"
autoninja -C out/Default chrome
After building, download DXC and place dxcompiler.dll and dxil.dll along chrome.exe.
Make sure you have the latest Vulkan beta driver installed.