- Home /
Unity 3D it is possible render mutiple cameras on different layers in the same space?
Hi guys,
I'm working on a project... but I have a big question. Is it possible to render more than one camera in the same space merging them.
To be more clear I want a camera and then on the top render another camera (so the alpha is less or they are mixed), they share the same space on the screen.
is it possible? and how
thank you
Answer by DaveA · Apr 22, 2014 at 04:59 PM
If both cameras are in the same place, and have the same view rectangle, but different depths, the one with the higher-numbered depth will draw last. Thing is, it will overwrite what's under it. So you may need to render to texture, then place a quad in front of the second camera looking at that texture, and that texture would have transparency (and a shader with transparency).
Depending on what you want, instead of using the Render Texture, you could have the fore-most camera not clear to skybox, but cleat to depth, or nothing, and see if that works for you. Probably not though.
I'm not sure if he wants to achieve like a split screen effect or mirror effect. Well, the mirror effect as i can imagine isn't simple, you need a quad as you said with a material that will shows the camera's field of view and I'm not even sure if Unity basic supports that. If it's split screen then it shouldn't be so hard.
Answer by Tony_T · Apr 22, 2014 at 04:56 PM
If i got it right, try setting up 2 cameras on the same position and change the Viewport Rect in the Inspector on each camera.
Your answer
Follow this Question
Related Questions
Changing two different objects renderer colour 1 Answer
How can i active again a render texture after set it to null ? 1 Answer
Why does my materials get destroyed on some persistant objects ? 2 Answers
Is there any command that can reference deactivated objects? 1 Answer
Need to set updateWhenOffscreen, but no SkinnedMeshRenderer is present 1 Answer