I have found this great simple shader that masks out everything from http://pixelplacement.com. However, I would need to expand it so that I have control over which layer I want to mask out. Here is the code:
Is there a way to do this? Can anyone help me out with this, please? Many thanks in advance! :)
Layers do not exist in shaders. It's a Unity runtime feature. The best way is to use multiple cameras for the different layers. That way you can render the layers seperately.