9 lines
2.2 KiB
Markdown
9 lines
2.2 KiB
Markdown
# SSAO
|
|
|
|
Screen space ambient occlusion (SSAO) is a technique in [computer graphics](graphics.md) of **[approximating](approximation.md)** ambient occlusions (basically dim shadows in corners) in a way that's easy and not so expensive to implement to run in [real time](real_time.md).
|
|
|
|
Exact ambient occlusions can be computed with algorithms such as [path tracing](path_tracing.md) and this requires complete information about the geometry as to compute the exact light bounces, but that is way too slow for real time (even though actually path tracing is already kind of possible in real time, but requires expensive consoomer hardware). So game devs cheat and use a cheap approximation: SSAO is implemented as a [post-processing](post_processing.md) [shader](shader.md) and only uses the information available on the screen, specifically in the [depth buffer](z_buffer.md). This gives only partial information, the algorithm doesn't know what the back facing geometry looks like and has to make guesses which sometimes results in inaccuracies.
|
|
|
|
This methods is notoriously ugly in certain conditions and many [modern](modern.md) [games](game.md) 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](suckless.md) way is to simply do no ambient occlusions -- 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](baking.md) the ambient occlusions in textures themselves, either directly in the color texture or use so called **[light maps](light_map.md)**. 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). |