Hey everyone, I am actually trying to change rendering order of some objects. Here is an example of what I am trying to do. I've made some tests but without any good results as sometime the shadows disappears, multiple cameras doesn't work, etc. Anyone has an idea on how can I do that (Stencil, Render Queue, Depth, etc.) as I am using deferred rendering ? Thank you very much.
So if you want to violate depth laws and render some objects on top of others you need to manipulate rendering order and how objects treat depth buffer. There are multiple way to do that, such as: 1) Make you second objects be rendered after first using RenderQueue and render it with ZTest Always 2) Switch off ZWrtie on the first object and render second on top of it 3) Render second object on top as you would normally do, but clear depth buffer just before doing it etc. Also it's not exactly clear what is displayed on your illustration. Are those a glass windows? Are they transparent?