I Use a vertex shader that manipulates the object to create a animation. The system is depended on the models local coordinates to work properly. Unity batches all the instances of this model together and the animation fails.
Is there a way to:
a. Disable Dynamic batching on a per shader basis.
b. Get the object root location as a uv coordinate within a batched group ?
There is a solution described here, that work at least for dynamic objects :
DisableBatching tag
Some shaders (mostly ones that do object-space vertex deformations) do not work when Draw Call Batching is used. DisableBatching tag can be used to incidate that. There are three possible values: “True” (always disables batching for this shader), “False” (does not disable batching; this is default) and “LODFading” (disable batching when LOD fading is active).
B. Unity won’t provide it, but you can come up with your own solution. Obviously, the more vertex attributes you need, the uglier the solution will have to be.