Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Feedback Hybrid Renderer does not render properly with LWRP / URP + SRP Batcher enabled

Discussion in 'Data Oriented Technology Stack' started by desertGhost_, Oct 4, 2019.

  1. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    185
    I think that there is a thread that brings this up, but I couldn't find it so I am going to post about it again.

    I noticed that shadows are black on objects rendered by the hybrid renderer when the SRP Batcher is enabled. This occurs with both the Lightweight RP and the Universal RP.

    Here is a simple example of the issue:

    SRP Batcher enabled (shadowed faces are black):
    SRP Batcher Enabled.png

    SRP Batcher disabled (renders as expected):
    SRP Batcher Disabled.png

    Should I file a bug report?

    Thanks.
     
  2. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    798
    it's even worst :(
    in my case im having different bugs on different devices. (more details here).
    also this bug is happening only when using Vulkan or OpenGL ES 3, by using the OpenGL ES 2 everything is working again.
     
    Last edited: Oct 4, 2019
    Baggers_ likes this.
  3. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    392
    Did you send a bug report?
    It's even worse in 2020.2 ...
     
  4. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    185
    Are you using Hybrid Renderer V2? I was having this issue with Hybrid Renderer V1 (which is no longer under active development). Hybrid Renderer V2 is supposed to support URP, but I am now using HDRP in my project so I don't know how well URP works with it.
     
  5. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    392
    Nope, I'm not using ECS. (At least not Unity's)
    I'm just trying to use the BatchRendererGroup directly, since it is a pretty simple API that may provide some performance benefit for us.

    The thing is if you disable SRP batcher, everything works out of the box, but if you enable it things start to break.
    2020.1 URP, 2020.1 / 2020.2 HDRP: Ambient is missing like in the original post
    2020.2 URP, 2020.1 / 2020.2 Custom RP: The objects disappear completely

    And when I say disappear that means there's no draw call happening at all, not just some mess up with the shader input (that could be worked around manually).
    We already have workarounds for missing ambient, because Graphics Jobs breaks that too. (Graphics Jobs is worse than the SRP batcher as you can only see the bugs in the build, not in the editor.)
    But when the draw call is absent I have no idea what to do...
     
    Nyanpas likes this.
  6. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    392
    QA responded that BatchRendererGroup doesn't work without Hybrid renderer in URP because it was a fix for this bug:

    https://issuetracker.unity3d.com/product/unity/issues/guid/1233527/

    I found that in my custom SRP the reason nothing was rendered was that instancing was not enabled on the shader I tried. (I previously used DrawInstancesIndirect which doesn't need instancing to be enabled...)

    I still have no shadows for some reason and only tested it in 2020.1 so we'll see...
     
unityunity