Search Unity

Question Are URP Decals compatible with SRP batcher?

Discussion in 'Universal Render Pipeline' started by grllle, Jan 12, 2023.

  1. grllle

    grllle

    Joined:
    May 4, 2015
    Posts:
    28
    Can anybody confirm if the URP decal shader can be SRP batched within the dBuffer?
    From what it looks, the shader should be compatible, but in my tests (2022.1.17) all decals are rendered under "Decal GBuffer Render" without any batching.
     
  2. Jonas-Mortensen

    Jonas-Mortensen

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    110
    Hey!
    The way the DBuffer is rendered unfortunately doesn't work with the SRP Batcher. I would advise to use GPU Instancing as much as possible.

    We are looking into hooking the decals up with the Forward+ data structure for clustered decal rendering as a performance optimization but that work is not planned yet.
     
    grllle and DevDunk like this.
  3. grllle

    grllle

    Joined:
    May 4, 2015
    Posts:
    28
    D
    Thanks so much for the explanation!
    Does this affect screen space decals using the gbuffer as well?
    Forgot to mention that we are using this in deferred
     
  4. BernhardTheThreak

    BernhardTheThreak

    Joined:
    Dec 1, 2022
    Posts:
    4
    @Jonas-Mortensen
    Apologies for the bump but do you have insides regarding this use case?
     
    Last edited: Jan 17, 2023
  5. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    60
    oof ... this being said in jannuary of this year dosn't make me particularly happy


    tho, on the bright side, at least from MY, testing, and the relatively faster rate of replacement that mobile phones have (compared to PC and consoles) is a non issue


    I'm happy already with the state of urp and srp batcher right now ... so good luck on improving it in the near to distant future
     
  6. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    60
    As an advice, i would advise AGAINST using the DBuffer, expecially on mobile devices.

    I found a nice sweet spot that uses a forced standardized 720p render texture and screen space decals with medium quality.

    Forward rendering of course, as deferred is NOT the way to go imo ... forward+ clustered is very promising, but still ( in my opinion ) not even necessary
     
    Jonas-Mortensen likes this.