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

Rendering many unique mesh/material best approach

Discussion in 'High Definition Render Pipeline' started by snacktime, Feb 22, 2020.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    The use case is customized characters just FYI but I'll try to keep this specific. Basically for each entity there are multiple meshes, 4 to 8 per entity. Let's say 24 unique total which should be close to the max. The mesh texture there can be variants per mesh. So worst case can be unique texture for every mesh rendered. Our design target is around 600 entities rendered on screen.

    Shader will be the same for all.

    So worst case for 600 entities we have to figure every mesh has a unique texture. So 4800 unique combinations to render.

    With built in we are doing a combine and atlas. With the SRP batcher I'm not sure what the best approach is now.

    The combine and atlas we do at runtime, it makes a number of things a lot more complex at almost every step of our pipeline from modeling to the complex progressive loading and LOD we have to do to make it all perform well. So I'm really hoping the answer is SRP batcher makes this go away.
     
  2. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Hmm so one thing that might throw a kink in this is the shader does have an instanced prop. From what I can tell that goes into the CBUFFER, although you would think instancing is a special case. The instanced prop is stable it only needs to be set once. Think I'll just have to test this myself, way too much engineering at stake to not know for sure.