Today I finished implementing SSAO. The result is messier than expected, with a lot of visible noise. I knew I had to expect noise between pixels, but I at least hoped that pixels close to each other would behave similarly, making noise softer on the eye.
Also, I realized that SSAO should be applied only to ambient light, or at least have different weights, and only influence diffuse light in a small amount.
That being said, the steps required to have a proper, functional implementation of SSAO seem to be:
1) Blur the result to soften the noise
2) Feed the texture to the lighting calculations, so that the right amount of AO can be applied properly.
I'm not sure I'll go ahead with the implementation, as it requires some big changes to the pipeline, and I really just wanted to test the post processor. But I might change my mind in the future, as the graphics pipeline evolves.
In the picture, you can see the AO factor buffer on the top, and the result applied to the image on the bottom (particularly visible near corners and edges).

Nessun commento:
Posta un commento