This should help: Instances with ShaderMaterial or How to set custom attribute on ShaderMaterial for use with instances and clones at the same time?