Shadergraph and BatchRendererGroup

How do you make something with ShaderGraph that’s actually compatible with BatchRendererGroup?
I can get it to work with Unity’s Universal Lit shader.
I can get it to work with Amplify Shader Editor (just tick “Dots Instancing” in the output node properties).
I can’t find how to get it to work in ShaderGraph (basic transform matrices work but all other data set in GraphicsBuffer seems to be ignored, despite using the exact same names than the ASE version).

I see some people just writing their shader manually to insert #pragma multi_compile _ DOTS_INSTANCING_ON, is that really the proper way?
I’m on 2022.2.12 URP, with the latest Entities/ShaderGraph package, in case it matter.

Here’s what a custom “_Color” property looks like. Key things are that the “Reference” is your actual shader variable name. The Override Property Declaration checkbox exposes the Shader Declaration which needs to be set appropriately. I hope that helps!

8953203--1229373--upload_2023-4-16_19-45-31.png

1 Like

Perfect, it’s working now.
Thanks - it must be the 3rd or 4th time one of your post is what unstuck my project.