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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question URP - each mesh is adding 2 batches

Discussion in 'Editor & General Support' started by Mornedil, Nov 1, 2022.

  1. Mornedil

    Mornedil

    Joined:
    Feb 7, 2016
    Posts:
    19
    Using the universal render pipeline, i've noticed that each unique mesh adds 2 draw calls instead of just 1. How can I reduce the amount of draw calls down to 1 per mesh?

    I've turned off all URP settings that add batches that I can find, such as shadow casting.
    For materials I'm using the Simple_Lit shader
     
  2. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    185
    Does this happen with any and every mesh? a primitive unity cube for example. if its your own mesh, it may have submeshes or multiple materials on it, which would cause extra draw calls. happened to me recently after learning to blend and caught me off guard.
     
  3. Mornedil

    Mornedil

    Joined:
    Feb 7, 2016
    Posts:
    19
    Yes, it happens with any primitive shape. And it's only happening when I'm using the Universal Render Pipeline.


    Edit:
    I found the culprit - The default directional light in the scene had Shadows enabled and set to Soft Shadows. Strangely enough this added 1 batch per mesh, despite shadows being turned off globally and no shadows were being cast. Since I wasn't seeing any shadows in the scene, I didn't expect shadows to be the cause.
     
    Last edited: Nov 2, 2022