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.
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.
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.
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…
QA responded that BatchRendererGroup doesn’t work without Hybrid renderer in URP because it was a fix for this bug:
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…