original technique is HERE by Arkano22.
I tuned it up a bit adding my circular texture sampling and pattern sample filtering.
Right now it is the best depth-only based SSAO I have come across.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuxS9AsjLrmpQzsxjawYzrGIXDa9WqlGFYQnt-JNJ2jBR2zttLTGhGZsy00sAzE2dFuI0cZlfbNsmOcQYKL9CWHxEP54WWANJVOXdoCdBW-5jDc6gswZD98ybg_waQXIpU4WfLr_I_TNIV/s400/ssao.jpg)
another screenshot with noise dithering and "garea = 0.4;" instead of "garea = 0.6;" to lighten scene a bit.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM3eI3rxQJVfoVXMuLCJm4GaBpLfXgmwDBDG0SU4cfu9fQPqIPjqp8uJDmyxmb_hm0K5rXKXzs90naflkbCEe4hUiSLcKDhYWSs1P0YKlgj9FVEgogWHu1huZnlWQJAsd_0nXr-tRAyTCz/s400/ssao1.jpg)
scene with and without ssao:
![](http://dl.dropbox.com/u/11542084/ssao_s.gif)
glsl frag shader HERE
and blend file HERE
Excuse me martinsh, but the only thing i get from your filter is a bit of black cell noise and an overall darker tone on the blend provided. When I try it on a custom scene, the filter turns the screenspace completely black. I am currently using 2.63 and a nvidia GT 540M. Could you give me a tip on how to make your filter work?
ReplyDeleteHi,
Deletea screenshot of how the blend looks for you would help me a lot.
also can you give me more detail about your system specs? GPU seems to be fine for it to run. I made it on even lower-end GPU. does something show up in console?
This comment has been removed by the author.
ReplyDeleteSorry I deleted my own comment! I was saying: thanks again for sharing this great shader, the vars permit fine tuning and it's awesome! The only problem I'm experiencing it's z-fighting with diffuse textures. I edited all vars but with no success. Can it be related to far/near algorithm? Thanks!
DeleteHi Antonio,
Deleteit is depth buffer related. Depending how your engine "translates" the z-buffer the results can vary significantly. if you posted a screenshot how it looks for you perhaps I can help you :)
Thanks Martins for the very quick reply, it's almost impossible to capture the glitch because it's like diagonal black/gray lines flickering on my model, when shader it's applied. I also noticed that effect is visible onlu when I use a post-production glsl effect that use Z-depth so, maybe, my problem is tied to the use of z-depth. I'll do more tests, thanks!
Delete