Remove URP Screen Space Ambient Occlusion on specific layer gameobjects

Hi! Here’s a solution:
9859917--1420272--Capture d’écran 2024-05-28 211024.png
In this image, the cube is on a layer we’ll call “IgnoreSSAO”
The sphere and the floor are on the default layer. (I cranked up the SSAO so it’s visible between the sphere and the floor.)

You’ll need to open your Renderer asset.
Right at the top of the inspector, under “Filtering” > “Opaque Layer Mask,” disable your “IgnoreSSAO” layer.
This should make the objects on that layer disappear. Which is good!

The “Ignore SSAO” layer will be rendered through a separate RenderObject (sorry, I haven’t looked into RenderGraph yet, so if you’re using Unity 6 you might get a warning telling you that RenderObjects are obsolete…)

“Add Renderer Feature” > “Render Object”
The setup for the render object is really simple: under “Filters” > “Layer Mask,” just assign your “IgnoreSSAO” layer.

In the context of a very simple scene at least, that was enough to make it work!