» interleaved SSAO with cubemap lighting
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

interleaved SSAO with cubemap lighting

effect
Credits: ssao technique by the superawesome ArKano22 of gamedev.net for his really (i mean reeeeeally) nice HLSL shader. original edgeblur technique by Rusty Koonce - published in GPU Gems 3 martinsh who posted a nice trick on the same thread to avoid the usage of a random texture. joreg for his vvvv port of the initial Arkano SSAO technique and the helppatch dottore for co-porting the edgeblur technique, providing outstanding shaderports to the community to learn from and also slightly pushing me to do this ;) All the other users and contributors - i learned tons of stuff from all of you!

about

this is a vvvv adaption of ArKano22's updated SSAO technique. (a vvvv version of his original technique by joreg can be found here) While the original version used 2d sampling, this one interleaves sampling in object space and therefore has the following benefits/changes:

  • should be slightly faster
  • view-independent sampling pattern - no more "boiling grain" during animation/camera movement

also ArKano22 added the following nice features to this version:

  • texturing
  • cubemap lighting
  • self occlusion parameter to add more control over the general look

known problems:

  • only edgeblur filter instead of hardware antialiasing

since this is my first contribution i'd appreciate any feedback on errors/optimisations concerning this effect.

download

SSAO3.zip
01.08.10 [19:21 UTC] by m4d | 1545 downloads
initial release - does not run on ati cards
Show 2 older revisions

Older Revisions

SSAO3_0.2c.zip
27.08.10 [17:39 UTC] by m4d | 765 downloads
fixed an error which user partikel pointed out
SSAO3_0.3a.zip
13.09.10 [16:57 UTC] by m4d | 1319 downloads
updated version with edgeblur filter to compensate for missing hardware AA

defetto 01/08/2010 - 20:21

can't give feedback about errors/optimisations, but i like! i think it looks better than previous joreg version, right?

m4d 01/08/2010 - 20:40

thanks, defetto! :) it's probably the view independent sampling pattern, i'd guess..

microdee 25/08/2010 - 17:49

something isn't right for me with this. ssao_do_ssao.fx (in the module) renders nothing just black (so the output of ssao3 module is again just black) (in the help patch). i've tried it on an ati hd4850 and on an ati hd5470. so what could cause this?

partikel 26/08/2010 - 17:43

hello m4d.
i have the same problem as microdee - ssao_do_ssao.fx stays black.
also with ati. i tried different texture modes and render settings, no luck.
thank you for making ssao3 anyways!

m4d 26/08/2010 - 20:52

hey, thanks for the feedback! i attached a fixed version which should run on ati cards. actually it's the exact same shader with the compile target set to vertexshader model 3.0. i have absolutely no idea why that is necessary, but it seems fair enough as long as it runs..

edit: this also seems to work for other shaders which refuse to render on ati gpus.
edit2: sorry, i uploaded the wrong version 0.2 first. if you've already downloaded it, please update for ati compatibility ;)

partikel 27/08/2010 - 00:32

that was quick. it's working now...
i still had to change the texture format for the upper dxtexture to
A32B32G32R32F, the second entry from the bottom. only then the do_ssao renderer shows the correct depth mask.
thanks again, m4d!

microdee 27/08/2010 - 01:49

great! thanks, now it's good!:)

m4d 27/08/2010 - 02:30
partikel said
i still had to change the texture format for the upper dxtexture to A32B32G32R32F

oh, that must have slipped in during debugging.. :o
fixed in v0.2b. also thanks for reporting!

edit: this patch seems to be haunted by some evil curse.. -> updated to 0.2c
(maybe the curse has been hastiness after all..^^)

aze 31/08/2010 - 22:00

thanks a lot for this shader! 0.2c works great! (i have an ati mobility 5850) can't wait for antialiasing.. =P

m4d 13/09/2010 - 03:19

thanks for the nice comment, aze! i posted an updated technique which incorporates edgeblur to compensate for the missing hardware antialiasing. dottore helped me with porting and evaluating several different techniques over the weekend (big up to him and defetto!), but this seems to be as good as it gets in dx9. dx10 ofcourse is a whole different story. (with msaa on mrts.. mhmmm..)

liquid 13/09/2010 - 07:08

working really nice,up 2 60fps,thank you so much

m4d 13/09/2010 - 14:30

thanks! glad to hear that. :) more stuff coming up..

aze 13/09/2010 - 16:30

difference is subtle but it's here and the perf is same, thanks guys! (radeon users will have to use vs3 in ssao_edge_blur.fx for it to work)

m4d 13/09/2010 - 16:58

aze, thx for pointing out! -> fixed in 0.3a

unfortunately it is much more difficult to go any further in dx9 with this sort of deferred approach. crytek uses a similar method for close to medium distance and a proprietary technique called temporal AA for medium to far distance objects, but then they are crytek.. :D
as mentioned earlier: dx10 would really help here..

beyon 14/09/2010 - 00:55

I guess it's not so unexpected that it runs slow on intel graphics, but it's rather surprising that the bottleneck is all GPU in windowed mode and CPU in fullscreen with similar FPS - must be the intel driver switching to CPU for some reason... (intel supports all of DX9 & DX10 on these cards but not all in hardware)

aze 14/09/2010 - 01:45

maybe not.. same on mine: GPU windowed, CPU fullscreen

m4d 14/09/2010 - 01:47
beyon said
I guess it's not so unexpected that it runs slow on intel graphic

hehe no, not really. i'd guess that it's the massive fillrate demand which is the bottelneck here. perfmeter may however report different results due to driver "optimisations" as suggested or other strange sideeffects..
i plan to release an optimised final version of this shader once i finished research on this topic. (don't hold your breath ;))

edit: just read aze's comment. i'll look into it over the next evenings. thanks for reporting!

anonymous user login

Shoutbox

~14d ago

~17d ago

joreg: The Winter Season of vvvv workshops is now over but all recordings are still available for purchase: https://thenodeinstitute.org/ws23-vvvv-intermediates/

~23d ago

schlonzo: Love the new drag and drop functionality for links in latest previews!

~1mth ago

joreg: Workshop on 29 02: Create Sequencers and Precise Clock Based Tools. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-08-create-sequencers-and-precise-clock-based-tools-in-vvvv-gamma/

~1mth ago

joreg: Workshop on 22 02: Unlocking Shader Artistry: A Journey through ‘The Book of Shaders’ with FUSE. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-12-book-of-shaders/

~2mth ago

joreg: Talk and Workshop on February 15 & 16 in Frankfurt: https://visualprogramming.net/blog/vvvv-at-node-code-frankfurt/

~2mth ago

woei: @Joanie_AntiVJ: think so, looks doable