Does anyone know how I can read and console.log the results from a compute shader? There are examples on the web for how to do this with raw WebGPU but doing this in Threejs isn’t documented yet. I tried calling the .readOnly() method but that does nothing to the proxy object.
@sunag given you’re the go to on three’s webgpu api, how can I get this done?
The data should be stored in a StorageBufferAttribute
or StorageInstancedBufferAttribute
in compute process, after computed try access using await renderer.getArrayBufferAsync( buffer )
.
2 Likes
Yes this is it!