- Home /
how to get instance_ID at surface shader vertex function
from the reference https://docs.unity3d.com/Manual/GPUInstancing.html , I know how to get instance_ID in surface shader in surface function, but when I specify the vertex function in surface shader and want to get instance_ID at this function caused errors. I know appdata_full annouce the UNITY_VERTEX_INPUT_INSTANCE_ID and I try to use UNITY_GET_INSTANCE_ID(v) and v.instanceID to access what I need but all case result in errors. It's obvious that INSTANCE_ON not defined. but if I remove instanceID relevant code, the Instancing machinism works normally. How could this happend??
Your answer

Follow this Question
Related Questions
GPU Skinning on iOS Devices? 2 Answers
Xcode Error: IOAF Code 3 1 Answer
iOS unity profiler cpu waits gpu 1 Answer
How to change material without creating a new material instance? 1 Answer
Question on iOS iPhone4 GPU Frame Time 0 Answers