Jump to content
  • Advertisement
Sign in to follow this  
GuyWithBeard

SSAO and edge artifacts

This topic is 1215 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey,

 

I have been looking over my slightly broken SSAO and I have one last problem. I render the normal/depth map at half res, and after that the ambient map at half res. After that I do a bilateral blur on the ambient map, comparing the main pixel normal and depth with the surrounding pixels' normal and depth, to make sure I preserve the edge discontinuities. This results in this nice looking ambient map:

 

ssao_ambient.png

 

However, when it comes to using the ambient map I get problems around the edges as the ambient map is half res, resulting in the nasty looking halo-effects seen here:

 

ssao_final.png

 

It seems that most people are rendering their SSAO at half res though, for performance reasons, so I would like to know how they deal with the problem of different resolutions in the ambient map and final buffer, and how to combine them nicely.

 

Thanks!

Edited by GuyWithBeard

Share this post


Link to post
Share on other sites
Advertisement

Thanks for the link but I am not prepared to rewrite the whole thing right now. I was more looking for tips on how to tackle and/or improve the current system. Regarding your second tip, I think the problem with rendering full res SSAO is that the blur pass gets very expensive.

 

Anyway, I was able to improve my system quite a bit by changing the blur pass shader to not discard pixels across edges completely, but rather include them with a much lower weigth (I am currently using 0.25 of the original). This results in the following:

 

ssao_final2.png

 

There are still some halo pixels visible on the right, but overall the result is much nicer, so I think I am going to go with this for now.

Edited by GuyWithBeard

Share this post


Link to post
Share on other sites

I haven't done ambient occlusion yet but I'm very interested in this since I particularly hate the "bright aura" objects in games tend to have when this isn't fixed properly.

Share this post


Link to post
Share on other sites

I don't? I render a combined view space normal and depth buffer at half resolution as the first thing in the SSAO.

Usually second geometry pass is way more expensive than doing full res SSAO.

Share this post


Link to post
Share on other sites

 

I don't? I render a combined view space normal and depth buffer at half resolution as the first thing in the SSAO.

Usually second geometry pass is way more expensive than doing full res SSAO.

 

That may be the case, however since I am working with forward rendering I need to do a geometry pass to get the view space normals. If you are doing deferred then I guess you have a point.

Share this post


Link to post
Share on other sites

Can't you do a single geometry pass that writes normals too? ie, two outputs, normal forward lighting pass + an additional output for normals. Then you grab that target and use it for SSAO.

Share this post


Link to post
Share on other sites

Can't you do a single geometry pass that writes normals too? ie, two outputs, normal forward lighting pass + an additional output for normals. Then you grab that target and use it for SSAO.

This would basically turns out full deferred. SSAO should be only applied for indirect illumination which will need more information per pixel than depth and normal.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!