- Home /
2 camera setup in VR for 3D skybox no longer works
I recently upgraded an old project of mine from 5.6.3 to latest 2018. I had a setup where I had two camera rigs (prefab from the steamvr package), one of which was used to show the 3D skybox (the player is in space, so I use a 3D skybox to give the appearance of being near planets and stars).
The skybox objects are all set to their own layer. The skybox camera rig's eye camera culling mask is set to only show objects on this layer and its clear flags is set to Skybox, with a depth of -1.
The camera the players uses to interact with the game world has a culling mask set to not display the 3D skybox objects, and has its clear flags parameter set to depth only, with a depth of 1. Unfortunately this does not work, as the game objects don't seem to be cleared from each frame, giving a bizarre effect where the objects sort of paint the view as the player moves the camera around.
I've tried many variations on the camera settings but nothing seems to work. Any ideas on how to set this up?
Answer by slims · Aug 07, 2018 at 04:28 PM
I solved this simply by setting the target display to 1 for both the skybox camera and the main camera. I don't know why they were set differently but at least the solution was simple.
Your answer
![](https://koobas.hobune.stream/wayback/20220612172359im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
"Moving" skybox closer, to emulate a smaller room? (VR 360 degree app) 2 Answers
Detail meshes renderices black when they hit the skybox on vr 0 Answers
Build an iOS application for personal use without license (not planning to publish or sell)? 0 Answers
Skybox not moving (camera issue?) 1 Answer
Skybox in HDRP 1 Answer