I switched to deferred rendering and my custom skybox (forward material) is overdrawing some of my objects in the background that are using deferred materials. The reason for this according to the frame debugger is the fact that forward materials will be rendered after the deferred GBuffer rendering is done. The skybox material has ZWrite Off and ZTest LEqual so it’s comprehensible that it is overwriting the aforementioned objects in the background.
Is there a way to render some materials in front of the deferred pass? How is Unity solving that? Is Unity internally drawing an insanely huge sphere or how does it happen that Unity’s default-SkyBox isn’t overwriting my background objects?
Note: “Custom sky box” means that I’ve created a separate gameobject with a UV sphere as a mesh. I have to do that because Unity’s default SkyBox rendering mechanism happens right before the first transparent material which is isn’t suited for my needs.