I decided to clean up the thread in the showcase and move all relevant development comments, bug reports and suggestion in a new thread in which I can actually *post* images smile please report problems here, etc.

So, I added now the following features (or fixed the following bugs):
  • Sky entities are automatically bound to the diffuse view so that AO isn't calculated anymore on the skybox (if visible)
  • Fog is now supported (emulated in the combine pass - I can not disable fog in specific views!)
  • particles are ignored
  • To support sprites with soft alpha textures, you can set a flag liek FLAG2 or so (is customizable!). This way they are discarded from the depthmap and therefore receive no AO, but you can see through them the AO of hidden surfaces, depending on the sprites' alpha texture (see image(s) below).


Here is how I deal with the soft alpha issue:

This is how it looks like at the moment:

I discard pixels with alha less than 50% and sample the depth of the sprites, like the plants in the Sponza Demo. This is wrong! The brightness of the sprite is drastically reduced and the (soft) alpha is cutted. We do not want this on effect sprites, like halos, lightshafts or drop shadows!

So, in the seperate view I sample once the depth of the scene without entities with FLAG2 on (the alpha sprites) and at the same time the alpha of these entities:


I use the depth map for AO and fog calculations. In the combine stage, I simply supress AO depending on the alpha mask and then I apply the fog:


A fellow here promised me beer and chips if I finish the soft alpha-sprite support very soon (due to a dead line for his project), so I delayed other requests to help him out. The pending list of features are these:

  • no blur on sky pixels and 100%-fogged pixels (better performance)
  • checking stencil shadows
  • checking blurred stencil shadows
  • dual AO calculation so that meshes with alpha will receive AO and you can see AO on hidden surfaces through their transparent parts
  • use static AO via 2nd UV set if provided (better performance)
  • seperate particle mask if fog is active
  • generate random vectors on startup (optional)
  • try other filtering options for the blur stage
  • enhance Sponza demo with effects to demonstrate features and support of pre-existing shaders


If something is missing, please tell me. I will add the first item of the todo-list (ignore sky- and 100%-fog pixels in the blur stage), clean it up and then I make a public release!

Last edited by HeelX; 12/19/10 18:32.