I’m writing some shaders and trying to be as optimized as possible. I am noticing that this is causing various objects to be rendered using different render paths. As show in the screen shot. ( Blue = Deferred Lighting, Yellow = Forward, Red = Vertex)
Deferred lighting has a relatively large fixed cost. If you’re planning on using deferred lighting at all you should have as many objects using deferred as possible at the exclusion of all else.
If you’re not using deferred, then mixing “forward” and “vertex” is fine, technically they’re both just being rendered using the forward rendering path.
The most basic pros & cons between deferred and forward are:
Deferred:
Render a lot of lights very fast!
Limited to one shading model.
Anti-aliasing limited to post process image effects
Forward: