Can somebody me get WebGPURenderer running

This is my current sandbox: https://codesandbox.io/p/sandbox/frosty-monad-ggrkmh?file=%2Fsrc%2Findex.js

I am following a guide but don’t know if it’s outdated. R3f doesn’t care what kind of renderer is underneath, i should be able to just inject WGPURenderer. It seems it’s async now, so i await the init and then start the frameloop which calls gl.render(scene,cam). But all i see is a blank screen, no errors.

So it works locally, if i download the box + yarn + yarn start, it runs. What could possibly make three/webgpu fail in codesandbox … thinking of that, i have actually not seen a single CSB example of wgpu.

We looked into it some more and it seems the issue is with codesandbox. It can’t understand that three and three/webgpu (which re-exports three) is one and the same namespace. It makes two three’s out of it, which then breaks things like instanceof and who knows what else.

We made a small patch to fiber removing all instanceof wherever it was used. It finally works https://codesandbox.io/p/sandbox/silly-austin-h8trld?file=%2Fsrc%2FApp.js I forwarded the bug to CSB, hope they solve it.

3 Likes