I have an object and started to apply a physical material in the editor. What I want is that the material should look different (maybe only outlines visible or some kind of transparency) whenever it is occluded by another object. Is there a way to achieve this in a single material, maybe with shader chunks? Or will I always need to copy my mesh and add another material to it? Thanks in advance.
Thank you both. Exactly what I needed. I thought for outlines you should need to use the same mesh and make it bigger/smaller and render it twice but this is way better. I still need some time to get the full potential of the layer system and the post effects.
Well, that’s how outlines shader works behind the scenes. It just renders the mesh a second time, bigger than the first one, then removes pixels that are drawn over the original one, leaving only the ones that are outside. This gives an effect of an outline.
heightmap_anim on BG used for pseudo water effect, based on caustic algorithm.
I used it for water animation simulation on texture over animated model.
Caustic over sphere may looks like ocean or like water (or whatever) globe.