Screen space ambient occlusion
I recently wrote an SSAO shader to further enhance my renderer quality. This effect approximates global illumination by computing an ambient occlusion map in a post-processing pass.
The cost of this shader is relatively low for its benefits, and is independent of the scene complexity.
The image to the right shows:
- Blurred SSAO output
- Directional Lighting
- Lighting and SSAO
Framework:
- C#
- HLSL
- XNA
Features:
- Up to 32 samples per pixel
- Use normal information
- Smart blur to smooth out noise while preserving edges
