Can't load examples that use WebGPU in Playground?

Below is a sample using Compute Shader on WebGPU.
This sample was working in the past, but is no longer available.

It doesn’t get past the loading logo state and the source code doesn’t appear in the Playground editor.
The source is visible in the sources section of DevTools, so it appears that the sample is being loaded internally.

https://playground.babylonjs.com/?webgpu#Y2UGQ5#3

If you remove webgpu from the Playground URL options for the same sample, the source will be displayed in the Playground editor, but an error will occur, probably due to the WebGL mode.

https://playground.babylonjs.com/#Y2UGQ5#3

There was probably some changes in how storage buffers are read back to the CPU since you created this PG.

You now have to pass true for the noDelay parameter of StorageBuffer.read, because the engine render loop is not setup yet when you call positionStorage.read (and reading from the GPU buffer is done by adding a callback to engine.onEndFrameObservable):

1 Like

Thank you. That was very helpful. My other samples that had stopped working are now working again.

1 Like