Post-Processing Pipeline: Access to a Normal Buffer for SSAO
I was looking into write a SSAO post-processing effect with the new EffectPass API that has been implemented recently. For the conventional SSAO approach, in order to produce the occlusion component, we would require the surface normal to be provided as an input buffer from the previous rendering phase.
Is there a way to configure this to be exported within the Renderer pipeline at this stage?
Many thanks, Luke
Well, the approach you are describing requires a g-buffer, as in deferred rendering, correct?
In pygfx we are currently doing forward rendering, so I don't think this is the right approach.
Maybe you can investigate if there are forward rendering compatible variations on SSAO?
Or alternatively you can point out how my understanding is wrong? :)
That is a very helpful suggestion. I am not at all an expert with graphics programming, and for some time wanted to implement the effect to improve scientific visualisation, so I have been trying to find a solution how to achieve this with PyGFX.
The guidance is appreciated. I will look at forward-rendering approaches to see if this can be achieved an alternative way instead 🙂
Thank you, Luke
Some cursory research indicates it's possible to reconstruct normals from the depth buffer at the cost of some precision. We do have the depth buffer available. Maybe this will allow you to implement SSAO as a post processing effect?
See #1254