So I’m having a bit of a problem getting my head around stencil shaders. Right now I basically want a shader to attach to a plane that will show a completely different “world” behind it. I know stencil buffers can be used to reveal certain objects, however I basically want to replace the entire world. I have made the plane spontaneously appear in front of some objects that have just a standard shader attached to them. I also have some other different objects in the same area that require the stencil shader to appear. I want the plane to basically filter out all the normal objects and then reveal the hidden objects.
So I know I can make the plane’s shader set the stencil buffer to 1 and then have all the hidden objects require a stencil buffer value of 1 to reveal. However I want the other objects to disappear, but I don’t want to modify their shaders.
How can I do this?