What is the best (most common) approach using SSAO with forward renderer for blended objects?
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Using SSAO For Blended Objects
SSAO only works if all depth is already known.
So to do it in a forward renderer while shading (not as a post process), you'd need a depth prepass first, which would also help help to skip over redundant AO computation due to overdraw.
But i would prefer to do it as post process even with a forward renderer to reduce divergence.
Support for transparency is hard because depth only gives us the closest fragment to the camera.
You could try a stochastic depth buffer, but that's quite costly and will have limited quality. The usual workarounds (render opaque, add AO, render transparent stuff without AO) are probably the best option.