I hadn’t realized that deferred rendering just flat out refuses to work properly with overlay cameras. It works fine with UIs but even a second forward rendered camera just comes up black in the deferred camera. So what’s the best solution for a 3D skybox in a deferred rendering environment?
I’d be happy with pre-rendered solutions but just using a normal skybox looks pretty terrible to me though maybe there are ways to “sell” the effect better I don’t know about.
I could render the second camera to a texture and project it to a sphere enclosing the deferred camera but I feel like that’s a pretty heavy solution performance wise. Is that the better tactic to pursue?
Tried to have another deferred camera for your skybox instead of having it in forward?
Or you could simply NOT have two camera and have your skybox shader using the propery rendering priority; http://docs.unity3d.com/Documentation/Components/SL-SubshaderTags.html
Tags {"Queue" = "Background" }
You make your skybox very small and parent it on the camera with a script, only in position. It would always be rendered first.
Yep, if it is perspective (orthographic looks kinda weird) I can’t get two deferred cameras to overlay properly. My background camera just renders as a black wall.
That shader idea is really interesting and I hadn’t thought of it as I don’t have much shader experience. Lemme test that out and see if that works for what I was intending.