Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

SRP Batcher - Increased CPU rendering times

Discussion in 'Universal Render Pipeline' started by ed-spatialsauce, Jun 26, 2020.

  1. ed-spatialsauce

    ed-spatialsauce

    Joined:
    Mar 4, 2019
    Posts:
    10
    Hey there,

    I'm currently working on a mobile app I'm trying to optimize for. I was originally concerned that the models were too high in tri count, so I was exploring what I can do with the SRP Batcher to resolve the issue.

    I found when using the SRP Batcher the CPU performance was increased dramatically and the performance was overall worse than having it turned off, static batching off and dynamic batching off.

    I am wondering if the SRP Batcher isn't working well because my buildings are built with a lot of meshes, rather than just one mesh for each building. Resulting in more batches?

    I also keep seeing negative saved batches. I tried finding out what that means but I couldn't find a solid answer. I also have about 1731 batches and 10893 saved when NOT using SRP Batcher, and 12692 batches and -1262 saved when using SRP Batcher.

    I have attached some images showing performance using the SRPBatcherProfiler.cs I found in another thread.

    I'm really struggling with this so any answers would be extremely helpful!
     

    Attached Files:

  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,864
    Hi!
    What device model is this?
     
  3. ed-spatialsauce

    ed-spatialsauce

    Joined:
    Mar 4, 2019
    Posts:
    10
    Pixel 1
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,864
    SRP batcher is not guaranteed to be faster on all content on every mobile device - it seems in this particular case it's not.
    The scene doesn't look too expensive to render in the first place.
     
  5. ed-spatialsauce

    ed-spatialsauce

    Joined:
    Mar 4, 2019
    Posts:
    10
    That's good to know, but It would also be handy to know why it's not running well and what I could do to improve it.

    In my case I was speculating I was using a lot of meshes and the tri count is high. I feel that reducing the tri count is a given, but does reducing the amount of meshes help at all? The buildings in the scene have been made by reusing a lot of models (See image attached). If I reduced the buildings down to 1 mesh each would that help a lot?

    I've uploaded some images showing the buildings, and other stats when SRP is turned off and on.
     

    Attached Files:

  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,864
    The only way to reliably find out is to try on the target device :)
    Looking at the number of draw calls, I would first try reducing the number of meshes.