Search Unity

  1. Dismiss Notice
  2. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  3. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  4. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted GPU instancing not working correctly with URP

Discussion in 'Universal Render Pipeline' started by upsidedawnstudios, Nov 26, 2020.

  1. upsidedawnstudios


    Nov 25, 2020
    So I've been trying to use GPU instancing with in my project (WebGL 2.0 with unity 2020.1) and couldn't seem to figure out what was the problem. I had a simple scene with various meshes (forming a city block as figure below) duplicated n times, all using the same material (URP/UNLIT). upload_2020-11-26_12-23-49.png upload_2020-11-26_12-24-51.png upload_2020-11-26_12-27-2.png
    As you can see the by the image above there was no batching going on. I experimented a variety of solutions from other forum posts but nothing seemed to work, until I tried to disable the SRP batching (in the pipeline asset) and it reduced the batches by a lot. Absolute bonkers!
    Is this a bug, or does the SRP batcher has better performance in other specific case scenarios?

    Attached Files:

  2. peterbay


    Unity Technologies

    Nov 2, 2017
    The SRP batcher optimizes the draw call cost, so the batch count can't really be used to compare the performance of the two. Notice that the overall performance is better in your screenshot with the SRP batcher turned on. You can read more about how the SRP batcher works here:
  3. Yashiz


    Jul 9, 2015
    GPU instancing and SRP batcher are mutually exclusive.
    To your statistics window, we can see SRP batcher is the winner regarding performance of your scene.