What's the dirty when using SSAO (ambient occlusion) post-process?

I use this playground took from here.

I see some strange artefacts there. Don’t know how to call it. It’s like some texture on the screen on top of the scene. It’s easier to see it in the shadows when you moving the scene along the vertical axes. My video has low fps, can’t record properly with my OBS, sorry. It’s better see it in playground.

Do you see it too? What is it?

Hello! I can see it in the playground. SSAO is a technique that samples the screen’s depth buffer for each pixel, and involves some randomness in the values (You can read more about how it works here LearnOpenGL - SSAO). You can see how the SSAO buffer looks like here:

image

This result is still blurred to reduce the appearance of noise, but due to that sligthly random nature, we get this “texture” effect when moving the scene. One way to reduce this is to generate the buffer at a higher resolution than the scene, which means using a ssaoRatio parameter higher than 1: PGDemo | Babylon.js Playground (babylonjs.com).

2 Likes