Unsatisfied with both Deferred Lighting (since it has no anti-aliasing) and Forward rendering (which can only support a limited number of lights), I am trying to use two cameras: one for the bulk of my many-light-lit background scenery (Deferred Lighting), and then a second camera for my lots-of-sharp-edges foreground items (Forward rendering, anti-aliased).
This works as-expected if the second (Forward) camera has Clear Flags of Depth Only, but of course the foreground objects do not go behind anything in the scenery.
But if I set the second (Forward) camera Clear Flags to Don’t Clear, it’s as if the depth buffer is never cleared. i.e. as if Deferred Rendering does not clear the depth buffer, or is using a different depth buffer.
To “solve” this, I added a third camera, rendered before the other two that just paints to the depth buffer. This works, but seems rather overkill (I’ll only be enabling this at quality levels Beautiful and Fantastic).
Has anyone had any better luck mixing the two rendering paths to get the best of both worlds?