So if I understand you correctly you have 2 Cameras let's say:
MainCamera
: for displaying 3D content
ScreenSpaceCamera
: for only displaying that Screenspace "plane".
and what you want is: Allways didplay the 3D content on top of the ScreenSpace content, right?
So what you can do is creating a special Layer e.g. ScreenSpace
and than
As you can see now the 3D content (RedImage) is always drawn on top of the ScreenSpace (white).
Note: In case you want to be able to switch that Screenspace
on and off you need an additional Camera that actually clears the image! As you can see in the Camera Preview
that camera's buffer is not "cleared" (because we told it so).
So if you would disable the Screenspace
you would get what you see in the preview box! -> not good ^^
I would simply add a 3th camera e.g. BackgroundCamera
as child of the MainCamera
(so it is automatically moved correctly) and give it
Depth
= -2 (so behind the ScreenSpace)
ClearFlags
= e.g. SkyBox
CullingMask
= Nothing (so you really only render the background here)
If you have something more complex in mind like e.g.
- ontop UI (depth 0)
- ScreenSpace (depth -1)
- other 3D content
let those be rendered by the ScreenSpaceCamera
instead. So if you diactivate the Blurr Canvas they are displayed normal, otherwise blurred.
- Background (depth -2)
simply extend the example with 4 Cameras, Depths and different Layers.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…