a question about SSAO only being applied to ambient lighting

shuipi

Newcomer
When doing SSAO, how did you guys deal with the requirement that the ssao result should only be applied to ambient lighting, not the final lighting result? Because this requirement implies that when you're rendering the scene, the ssao buffer should have already been there so that the scene object shader can sample it and apply it to the ambient lighting. This is fine if you did a pre z pass first, because that's all you need to compute the ssao buffer. But what if there is not a pre z pass, like on 360? BTW I'm doing a traditional forward rendering.
 
For best SSAO quality/speed it's also good to have a full screen map containing normal vectors of each pixel. Deferred rendering g-buffer pass produces both a full screen depth buffer and full screen normal buffer before you need to calculate the frame lighting.

If your game requires forward rendering, a depth pre-pass is likely the best method. It also saves some pixel shader overdraw later on. However if you can switch to deferred rendering, your SSAO implementation should be a bit more optimal. Deferred shading is not a problem on Xbox 360 either. Our newest game Trials HD uses a deferred renderer, and we can still pump 60 frames in a second (v-sync locked) with lots of different post process effects, real time soft shadows, etc.
 
As sebbbi said, there is no problem of using depth pre pass on 360. Even you are using forward rendering, depth pre pass can let you fully take the advantage of Hi-Z.
 
Back
Top