Work / Multi-Resolution SSAO

2015-01-10 01:57:19


MSSAO implementation

Here is the fantastic paper that describes the process:

I slightly expanded the scene i used when developing the deferred rendering pipeline:


Size: 2.51 MB, Date: 2011-09-20 01:38, MD5: c95d3c91664129f8264c72d1176f9c8d


Size: 1.9 MB, Date: 2011-09-21 04:24, MD5: 33bb0c788b46b26da506e11b5c304124


Size: 2.38 MB, Date: 2011-09-21 04:22, MD5: e39e83d5558069e426c295eea4922960

At this point my implementation looked roughly right but was incorrect in a number of subtle ways. I then spent a significant amount of time getting everything right and improving it - this includes adding techniques such as using data from the previous frame to improve the accuracy in the current frame (temporal coherence exploitation is the fancy-pants way of saying it - this is discussed in the paper) - this greatly reduced the popping artefacts that tend to be generated from alaising in the lower resolution passes.

Latest Screenshots

I then ditched the previous scene as it was not complex enough. I used a model (that i downloaded from NVidia's website iirc) here, but my loading code is buggy and parts of the model are missing :p this mssao implementation in these shots is a near final version - but there are a few things that still need to be done to round it off - these include:

  • Improving the precision of the gBuffer normals (and/or improving their generation mechanism) - the current crappy normals are too low res and are what i am pretty sure (?) is causing the banding/lines on flat surfaces when they approach perpendicularity to the view vector (you can see it if you look closely at the screenshots).
  • Making the gBuffer slightly larger than the screen - this is so the AO at the screen edges can still sample geometry that would otherwise not be available (this is what causes the slight whitening at the edges as occluding geometry is clipped out).
  • Maybe investigating how to overcome some of the alaising effects that unfortunately occur with geometry that produces densely packed highly discontinuous depth values (like railings, or banisters as in the screenshots - or any geometry with edges that align nicely with the edges of the texels of the various gBuffer resolutions) - maybe randomly offsetting lower resolution gBuffer sampling/generation slightly from one to another so their texel edges do not align? IDK :)


Size: 2.1 MB, Date: 2015-01-14 01:07, MD5: c77a0174fce2c51021b05e7965aaa82d