Search Unity

How do I reduce my draw batches?

Discussion in 'General Graphics' started by art4melody, Mar 5, 2020.

  1. art4melody

    art4melody

    Joined:
    Jan 29, 2020
    Posts:
    8
    Hi,
    I am developing a game for mobile, and in the game I may have around 100+ projectiles of the same mesh and material + particle systems.
    I have been trying to optimize it but still having many number of batches.
    SetPass Calls: 26 Draw Calls: 634 Total Batches: 471 Tris: 93.2k Verts: 143.4k
    (Dynamic Batching) Batched Draw Calls: 167 Batches: 4 Tris: 14.3k Verts: 45.1k
    (Static Batching) Batched Draw Calls: 0 Batches: 0 Tris: 0 Verts: 0
    (Instancing) Batched Draw Calls: 0 Batches: 448 Tris: 0 Verts: 0

    Any advice on what I need to do here? I am still not able to get 60 FPS on my mid-high end device.
    I am using URP with SRP batcher on.

    What I have done:
    - All mesh are using same material (standard URP shaders)
    - Mark all environment objects static
    - Use subtractive mixed lighting mode, lightmap generated
    - Dynamic real-time shadow on for player and projectiles
    - Use only color adjustment post processing
    - Limit farclipplane

    upload_2020-3-5_14-53-46.png
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    @art4melody
    The particle system(s) could be one of the causes of that problem, especially if you have too many of them, or too many particles in the scene. And that is in most cases, not good for mobile. Even on PC, too many particles, or particle systems with physics on them, can cause slowdown.

    And alot of objects with shadows on them, especially if those objects are meant to move, can cause slowdown too. That's alot of calculations for the cpu to process.

    100 projectiles? I'm curious. What type of game are you making? It sounds cool.
     
    Last edited: Jul 22, 2020