Really cool, one you might have missed is Moment-Based OIT. Alan Wake 2 shipped with this, and I personally had very good results with it.
Yeah I’ve heard of moment-based transparency - it looks great. From the paper it seemed like you could still get some artifacts like blurring at hard edge intersections and incorrect looking overlap but maybe those can be alleviated? It looks like a really nice approach for more general use cases, though, and faster. A lot of my work has typically been with transparency for things like CAD models or cases where that precision is wanted so I’m not sure if it would be the best fit? If I wanted something with a similar correctness now I think I’d probably look at the Multilayer Alpha Blending, with WebGPU becoming more available. Always trade-offs
.
I think depth peeling is probably too slow and requires some unintuitive layer tuning to be considered “turn key” for anything.
I never figured out if you were in fact able to achieve this using textures, my conclusion was that without the proposed modification it was not possible.
For the translucent glass demo I wound up rendering depth in a dedicated pass to a color buffer and (I think) using discard in the other passes rather than relying on z testing. It was definitely just a demo and not anything practical, though.
Looks like it is possible now? Three has the API to do the proper setup?
Yup! You can reassign the depthTexture field, now, for this and other compositing effects. I wrote this demo to show it functioning but otherwise haven’t used it in anything. I had needed reassignable depth for rendering something else a couple years ago that I don’t recall, now.
Stencil does improve the performance
Yes I was thinking stencil may be good and possibly use of the scissor test, as well?