main page, file list, single page HTML, source, report, wiki last updated on 06/07/23


Screen space ambient occlusion (SSAO) is a screen space technique used in 3D computer graphics for approximating ambient occlusion (basically "dim shadows in corners", which itself is an approximation of true global illumination) in a way that's easy and not so expensive to implement to run in real time. The effect however looks ugly many times and is often criticized, see e.g. an excellent article at https://nothings.org/gamedev/ssao/.

{ 2023 report: SSAO still sucks. ~drummyfish }

Exact ambient occlusions can be computed with algorithms such as RTAO (which uses raytracing), but this requires complete information about the geometry and is too slow without special hardware. Therefore some game devs cheat and use a cheap approximation: SSAO is implemented as a post-processing shader and only uses the information available on the screen, specifically in the depth buffer -- this gives only partial information about the actual scene geometry, i.e. the algorithm doesn't know what the back facing, screen-perpendicular or off-screen geometry looks like and has to make guesses which sometimes result in quite visible inaccuracies.

This methods is notoriously ugly in certain conditions and many modern games suffer from this, even the supposedly "photorealistic" engines like Unreal -- if someone is standing in front of a wall there is a shadow outline around him that looks so unbelievably ugly you literally want to puke. But normie eyes can't see this lol, they think that's how reality looks and they are okay with this shit, they allow this to happen. Normies literally destroy computer graphics by not being able to see correctly.

What to do then? The most suckless way is to simply do no ambient occlusion -- seriously test how it looks and if it's okay just save yourself the effort, performance and complexity. Back in the 90s we didn't have this shit and games unironically looked 100 times better. You can also just bake the ambient occlusion in textures themselves, either directly in the color texture or use light maps. Note that this makes the ambient occlusions static and with light maps you'll need more memory for textures. Finally, if you absolutely have to use SSAO, at least use it very lightly (there are parameters you can lower to make it less prominent).

All content available under CC0 1.0 (public domain). Send comments and corrections to drummyfish at disroot dot org.