what is the usage of UNITY_VERTEX_INPUT_INSTANCE_ID?

I seen this definition like
CGIncludes\UnityInstancing.cginc: #define DEFAULT_UNITY_VERTEX_INPUT_INSTANCE_ID uint instanceID;
Anyone could tell me what this variable is? When and how should I use it?

Hi,

It’s for the GPU instancing, you can find more informations and example in unity doc here.

Thank you so much!

1 Like