![alt text][1]
----------
Hi!
**Short version:**
I have 3 groups of objects. I want to cut a hole in camera 1 and render camera 2 behind it, using the red objects as clipping objects. All the objects are in the same scene. I've tried using shader graphs applied to the camera.
----------
**Long version:**
So the above 4 part image is basically the effect I am trying to create. So I have a group of objects being rendered by camera 1 (picture 1), a second group of objects, in the same place in the same scene, being rendered by camera 2 (picture 2), with its own skybox (solid colours for an easy example). I've already done this using culling layers. Then I have a third group of objects, the culling objects (picture 3), shown by the red sphere, with the group 1 objects behind it for context, which could be black or any other colour, this doesn't matter, as long as it's an object defining where to clip. Picture 4 is the end effect I am trying to achieve. What I've done so far is having camera 1 rendering on top of camera 2 using the render priority. Now I'm trying to make a shader on camera 1 to somehow test all of the pixels, and if they match the exact color of a culling object, then render nothing for that pixel (including the skybox, which has been my toughest problem). Using any other way of determining where to cut pixels using meshes would be great! I don't know if having a color restriction like this will be a pain to deal with later! Either way, then camera 2 would render normally.
If possible, I would like to do this using the shader graph as appose to manually programming a shader. I would say I'm a pretty experienced coder, but not with programming shaders. I'm also using the Universal RP. As well, it would be great if I could have some sort of black border surrounding the holes or some kind of polish to it like that.
I've been doing a lot of research on this, and can make normal shaders just fine, but unfortunately there is not a lot of information out there on applying shader graph shaders to the camera itself. All the images here were made with Photoshop, although I did make a shader to get the red sphere to render as all 1 colour and ignore lighting information.
If it does matter, I would then like to render UI elements on top of all this.
----------
Help solving any part of this mystery would be very much appreciated! Thank you!
[1]: /storage/temp/174531-temp1.jpg
↧