How to write depth for node material compatibility with SSAO2?

In relation to my other post: Imphenzia PixPal palette texture node PBR material example

I’ve tried to extend this to also work with SSAO2 by adding SceneDepth and FragDepth nodes to the node material, but I haven’t been able to get it to work:

How do I extend a node material to work with SSAO2?

You have to use the PrePassOutput block and connect the viewNormal and viewDepth inputs for SSAO2 to work.

Here’s an example for SSR, which needs viewDepth, viewNormal and reflectivity:

[…] It was not difficult to add it for SSAO2 in your PG, so here it is:

1 Like

Thanks @Evgeni_Popov but for the second (my) example, I’m still seeing a lot of depth issues:

I removed the FragDepth and SceneDepth nodes I had added, and now it’s working, thanks @Evgeni_Popov !

3 Likes