How could I make NME material work with SSAO2?

Hey guys!

I wanted to address a small issue regarding SSAO2 render pipeline. I want to use it as a solution for some fake shadows in my scene. However, I noticed that SSAO2 seems to ignore my node material, in the sense that it does not produce the ambient occlusion effect around objects that have NME created material.
Any other material seems to be successful in rendering the screen space ambient occlusion (even when I select Default Fallback or none).

Do you have any ideas on this, please?

Here is my scene:
Office Node Mat | Babylon.js Playground (

I have also attached a screenshot below.

One thing that I would have tried is to go in debug mode and compare these two different materials side by side, but I can’t seem to “debug mode” the Node Material.

Thank you so much!

Welcome aboard!

You have to use the PrePassOutput block and set the viewDepth and viewNormal inputs for SSAO to work.

Here’s an example:

Node material:


Oh, so we don’t have prepass output by default in Node Material.
Amazing! I’ll look into this, thank you very much, Evgeni!