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. Dismiss Notice

Question Can URP Terrain/Lit shaders be SRP-Batched?

Discussion in 'Universal Render Pipeline' started by Fressbrett, Nov 17, 2022.

  1. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    83
    Hello,

    I just enabled SRP batching following the guides within the URP documentation and it does work as expected. However, I noticed over 1k draw calls just for my Terrain, which uses the default UniversalRenderPipeline/Terrain/Lit shader. According to the Frame Debugger the Terrain doesn't get batched through SRP Batching.

    The shader also states it's not compatible with SRP batching:
    upload_2022-11-17_12-55-42.png

    Is there a way to create a terrain shader that is compatable, or is there some obvious limitation that wont allow me to batch my terrains?

    Thanks for any help,
    Fressbrett
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,393
    What unity and URP version are you on?
     
  3. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    83
    I am using Unity 2021.2.12f1 and URP 12.1.4
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,393
    Can you check in 2021lts?
    If it's not there I suggest making a bug report.
    I am guessing this is because there usually is only 1 terrain however
     
  5. lc0040

    lc0040

    Joined:
    Aug 7, 2015
    Posts:
    2
    same in Unity 2021.3.3f1 / URP 12.1.6
     
  6. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    679
    No, and even worse, it actually breaks existing batches in the scene. We ended up writing an alternative terrain shader for our projects.