SRP Batching works for opaque pass but fails for shadowmap (Different Shadow Caster Hash)

Hello there,

I’m current have a shader “writen” using the Amplify Shader Editor for the URP, this shader is SRP Bacher compatible and I can get it to batch my opaque pass, but not in the shadowmap pass:

6479690--727838--1.png

My problem is with the ShadowLoopNewBacher.Draw, which isn’t batching at all; See more bellow;

Each object have a different _Color attribute and a _Anchor attribute;

Any ideas of how get the shadow caster to batch?

It’s a bug, link: Unity Issue Tracker - Multiple 'Render Main Shadowmap' -> '... Draw' -> 'SRP Batch' are present when the materials only have different properties

Upgrading to 2020.1.11f1 solved the issue!

Look at the link for more versions with the fix;