|
|
|
|
|
by kvark
2244 days ago
|
|
We are exposing writable storage buffers and textures in all shader stages (there is a caveat discussion [1] on the topic though), which means you can write data out directly. Sharing data between shader threads can be efficiently in the compute shaders (via the shared group memory), which are included in the core of WebGPU. P.S. vange-rs [2] is written on wgpu-rs and uses ray-tracing in fragment shaders for the terrain. I hope to run it in the browser one day! [1] https://github.com/gpuweb/gpuweb/issues/639
[2] https://github.com/kvark/vange-rs
|
|
Beware the behaviour of writes will not be consistent between vendors or shader stages, and may be surprising.