Enabling GPU Instancing breaks Vertex color data (2021.3.0f1)

Hi. Encountered a bug on 2021.3.0f1 Unity creating GPU Instancing enabled fragment shader.

When I add #pragma multi_compile_instancing to the shader and enable instancing in inspector, then vertex color i.color from appdata becomes always (1,1,1,1). If I uncheck enable instancing toggle then i.color is correct in vertext program. At least when using on Sprite Renderer which passes set color through vertex color.

Is there a fix or a proper way to get vertex color when using gpu instancing shader?

Hi!
Please report a bug.
Thanks!

I found a solution. But its not so obvious for someone not familiar with all Unity’s cginc files. You need to include UnitySprites.cginc if you plan to use shader on Sprite renderers