webgpu-samples icon indicating copy to clipboard operation
webgpu-samples copied to clipboard

[fr] transparent samples would be very helpful

Open lslzl3000 opened this issue 3 years ago • 1 comments

Hope some one share basic transparent demos, especially how to sort transparent objects in a WebGPU pass.

lslzl3000 avatar Jan 18 '22 09:01 lslzl3000

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.

kainino0x avatar Jan 19 '22 01:01 kainino0x