Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Multiple Render Paths in scene

Discussion in 'General Graphics' started by BergerBytesLLC, Jan 11, 2017.

  1. BergerBytesLLC

    BergerBytesLLC

    Joined:
    Oct 6, 2013
    Posts:
    2
    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)

    Screen Shot 2017-01-11 at 11.17.04 AM.png

    So I was wondering is there are any disadvantages to this? Or Advantages?

    Thanks

    Screen Shot 2017-01-11 at 11.17.04 AM.png
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    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:
    + Render a lot different shading models!
    + Works with MSAA
    - Many lights are expensive.
     
    theANMATOR2b likes this.