webgpu-samples
webgpu-samples copied to clipboard
[fr] transparent samples would be very helpful
Hope some one share basic transparent demos, especially how to sort transparent objects in a WebGPU pass.
There are a lot of possible algorithms for this. They're not WebGPU specific, although many newer algorithms probably would be more possible in WebGPU than in WebGL. If you're looking for techniques, you can check out some Order-Independent Transparency (OIT) techniques online and see what could be implemented. Or you can use CPU-side or GPU-side sorting to execute your draw calls in front to back order, if that works for your application.