- Home /
Depth of field with multiple cameras
Hey everyone, I'm trying to render my scene with two cameras, one rendering the background(depth 0) and the other the foreground(depth 1, "don't clear"). But I'm having trouble getting Unity's depth of field post process to work between cameras. I have the depth of field on the foreground camera which works fine, but everything on the background camera is ignored. After looking at it with the frame debugger, i noticed that the foreground camera is recreating the depth texture, thus excluding anything draw with the background camera. Is there anyway I could have the foreground camera either "add" to the existing depth texture, or maybe composite them together before the DOF post process fires? Or am I missing an obvious solution? Let me know if I left any important details out. Thanks for the help :)
@jedeo1994 ever found a solution?
bump I'd like to know as well. Solutions I found for Unity 5.x don't work on 2017.
I'm experiencing the same. Very frustrating - would love to know if anyone has a solution!
Your answer
![](https://koobas.hobune.stream/wayback/20220612120125im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
DepthOfField error using 5.4 2 Answers
How to get the pixel depth values of the camera view? 0 Answers
Depth of Field 3.4 and multiple Camera Layers? 2 Answers
Intersection Highlight Shader -1 Answers
Depth of Field in Unity Free 0 Answers