Why does this happen?
I see a fix that you can add a shadow caster pass to solve this, but why does that solve it? Can this be explained simply?
Why does this happen?
I see a fix that you can add a shadow caster pass to solve this, but why does that solve it? Can this be explained simply?
SSAO uses the camera depth texture to calculate the occlusion.
The camera depth texture is generated by rendering all opaque objects in the scene using their shadow caster pass.
Since the unlit shader doesn’t have a shadow caster pass, it isn’t rendered into the camera depth texture, so the SSAO is for the objects behind the unlit object.
Adding a shadow caster pass to an unlit shader will make the AO apply to the shape of the unlit object. If you don’t want it to be applied at all move the unlit object to the transparent queue range (2500+).
perfect explanation. Thanks @bgolus