You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a shot at getting the testbed running in the browser. It's a straightforward Emscripten port. The existing renderer runs unchanged on WebGPU (including the GTAO compute shaders), and the solver runs multithreaded on web workers.
It's a small change, around 260 lines, all fenced behind if(EMSCRIPTEN) / #ifdef EMSCRIPTEN, so native builds are untouched. The WGSL shaders are generated at build time rather than committed, and I added a CI job that builds the web target alongside the existing ones.
I guess the big question is: what would a wasm version be for? A few directions this could go:
Just a showcase: the testbed as an easily accessible demo of the engine's state, updated with each release.
Dev tooling: e.g., sharing replays/repros as links instead of attachments in bug reports.
An embeddable engine for web games: that's separate from this port, but the testbed proves the core runs well in wasm.
This PR only aims at the first one. Curious what you think.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I took a shot at getting the testbed running in the browser. It's a straightforward Emscripten port. The existing renderer runs unchanged on WebGPU (including the GTAO compute shaders), and the solver runs multithreaded on web workers.
Live demo (needs a WebGPU browser):
https://box3d-7rh.pages.dev/
Diff against current main: ErikSom#1
It's a small change, around 260 lines, all fenced behind if(EMSCRIPTEN) / #ifdef EMSCRIPTEN, so native builds are untouched. The WGSL shaders are generated at build time rather than committed, and I added a CI job that builds the web target alongside the existing ones.
I guess the big question is: what would a wasm version be for? A few directions this could go:
Just a showcase: the testbed as an easily accessible demo of the engine's state, updated with each release.
Dev tooling: e.g., sharing replays/repros as links instead of attachments in bug reports.
An embeddable engine for web games: that's separate from this port, but the testbed proves the core runs well in wasm.
This PR only aims at the first one. Curious what you think.
Beta Was this translation helpful? Give feedback.
All reactions