Search Unity

PLEASE Let us adjust the dynamic batching requirements

Discussion in 'General Graphics' started by joshuacwilde, May 2, 2020.

?

Have you ever wanted to adjust the dynamic batching requirements for your own project?

This poll will close on May 2, 2030 at 7:23 AM.
  1. Yes

    50.0%
  2. No

    50.0%
  1. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    This is a request to please add an option to allow the developer to change the dynamic batching requirements. Right now the limit is 300 "features" (vertices, uvs, etc). I would like to be able to adjust this number to fit specific needs for our game.

    Each game is gonna be bottlenecked differently CPU and GPU wise. It makes sense that this is something that each developer should be able to fine tune for their project.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hey, thanks for the request but it’s unlikely we will make any changes to this system.

    It’s an old system that generally only benefits on platforms where draw calls are *really* expensive. In reality this means GLES 2. And even then we’ve seen plenty of cases where it’s still not useful even on those devices.

    To add to this, many developers “optimise” their game by trying to get good batching stats, rather than measuring whether the batching is actually benefitting their frame times.

    I imagine we will remove dynamic batching completely when we can finally remove GLES 2 support (but it’s still used by a lot of old android devices today, so it’s not happening soon)
     
  3. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    I understand that for desktop class GPUs, draw calls are not a problem. But when we are developing mobile games, it is a big problem. There is a significant difference between a hundred more draw calls on even the most modern mobile processors from my experience. We have had huge performance gains from reducing draw calls, even if it is for the same amount of geometry and material/shader complexity.

    EDIT : I appreciate the response btw :)
     
    richardkettlewell likes this.
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Huge gains from dynamic batching, or just reducing draw call counts?

    Dynamic batching saves draw calls, but introduces other costs. Every vertex of the batched meshes must be transformed into world space by the cpu, and stored in the shared vertex buffer. Other vertex attributes must be copied to the buffer too. So it only wins if the cost of all that is less than the cost of the draw call.

    Presumably you’re hoping to increase the 300 limit - that is becoming a lot of vertices to transform, and still hope to beat the cost of the separate draw call.
     
    Last edited: May 3, 2020
  5. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    It's entirely an Android problem these days, really, IMHO. On iOS, you can get away with quite a lot of draw calls.

    (And even if you get the draw calls down on Android, you're often dealing with an underpowered GPU for the screen resolution anyway...)
     
  6. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Lol!:p