When I enabled SSAO or SSS, it ignores any objects that only show up through Render Objects (Experimental).
In this scene, the cube’s layer is filtered out by the URP Renderer and then rendered after by using the Render Objects feature. Even though it’s rendered before SSAO and writing depth is enabled, you can see the SSAO acts as if it doesn’t exist.
How can I do that, do you mean modify URP code? I’ve tried changing the render pass event of the SSAO and Render Objects to AfterTransparent if that’s what you mean. I can make the cube render on top but SSAO still ignores the edges it creates with the floor. I’d like it to play a part like normal when it’s not in a Render Objects feature.
Same here, just bump into this issue a while back.
You can try to include the cube’s layer in Opaque Layer Mask under Filtering as well. That fixed mine SSAO & Render Objs issue but somehow is not the right way to get it done.
However, I don’t see any Opaque Layer Mask Property or Filtering label in your post pic, weird.
Did you manage to fix this? I mean the fix would be to tick “After opaque” in the SSAO render feature. But did you manage to get the ambient occlusion on the object that is rendered with the render objects feature?
I am having the same issue right now. No matter what I do (move SSAO around, change settings). SSAO is drawing over my Render Objects. I can’t have the same layer drawn in the base pass.
I am still on 2021. In case this is fixed in later versions?
I was able to fix it in my case by ticking ‘after opaque’ in the SSAO settings. Its under the quality dropdown, as in the image below:
Is that one of the settings you were changing while trying to fix this? If it is and it didnt work in your case, it could be a version thing (im on 2022). Might be worth making a test project on a later version to investigate that.
Yeah, I tried that and some other things. For me setting it to Depth instead of Depth Normals fixed the problem with the SSAO, but I also had to change the decals to Screenspace and that made them look wrong. Note that I am still on 2021.
What worked for me:
Filtering the tools layer
Set SSAO as the uppermost feature
enable After Opaque for SSAO
On the first render objects AfterOpaques Depth Always Write Depth on
On the second render object AfterOpaques Depth Less Equal Write Depth on
You are welcome
I still cannot get SSAO to run on the first person objects, perhaps you misunderstood my question? Do SSAO work on the 1st person layers of your screenshot?
It’s weird that you guys are putting SSAO below/after your RenderObjects. This setup never works for me and I’ve tried many variations. Instead the only way I’ve managed to avoid the bug is by moving SSAO BEFORE/ABOVE any RenderObjects, and also activating the checkbox “After Opaque” in the SSAO effect as suggested. This was the only way I could get it to work in Unity 2021.3.
Maybe baking AO into a material could work around this. Not sure if you can make it respect direct lighting (only render in shadows) though.