Hello fellow Unity’ers.
I’m doing a scene, where I’m rendering out a foreground, midground and background(papercut look), where I need the invisible objects in front to cast shadows on the layer behind. It works perfectly by using shadow only in mesh renderer - but the Ambient Occlusion is gone - is there a way to have that added when the objects are invisible?

Any direction would be much appreciated.

Cheers

You could write a shader that falls back to something default (such as VertexLit ) so it has all the passes such as shadow caster, depth / normals pass etc available, but just disable the RGB and depth write flags. It would produce unnecessary draw calls though (for ambient / light rendering that gets masked out anyway, so make sure your shader is recognized as unlit and doesn’t create passes for extra lights)

Thanks a bunch Pangamini.
Writing shaders is beyond my capabilities as an animator, I was hoping there was a dropdown similar to the Shadows Only. Couldn’t find anything on the Asset Store either.

Thanks though.
Cheers, Dan