SSAO and particles

I am trying to implement the SSAO filter in a project game, but I am having some problems in getting it to work with particles. The ambient occlusion is calculated for the particles to, and a black contour is shown around them.



Is it possible to exclude some object, like particle emiters or regular objects from the SSAO filter? Or at least some sort of hack that could make it somewhat working?



http://i.imgur.com/h0HGZ.jpg

that’s strange well particles does not write depth normally, did you set the depth Write to true on your particles material?

Yes… I have set it to true and the ambient occlusion still renders on them.



One other thing that I have noticed is that when cloning spatials containing particle emitters , the rate at which the particles spawn is doubled for every clone. I have tried a deep clone too, but then I get a negative array index exception.

colin said:
Yes.. I have set it to true and the ambient occlusion still renders on them.

I think i mislead you, i mean depthWrite should be false so SSAO won't be computed for particles
I you want to keep the depth write for any other reason try to play with the AlphaDiscardThreshold on the particle material.
For example a 0.1f value will discard all the pixels that have an alpha value blow or equal 0.1f.
But don't really know if it will look good in your case...