I have been struggling to create a shader for my model of ~40,000 vertices. I have 144 vertices which I have assigned a colour to. (These 144 vertices represent real life data that I have obtained from sensors, so I can not increase the number of vertices initially coloured)

I would like to create a colour gradient between these vertices, so that the entire model is coloured, similar to a heat map.

I’ve tried using Lerp on the vertex matrix, but because the vertex numbers are seemingly random compared to their location, I’m not getting the interpolation between appropriate locations, rather neighbouring vertex numbers.

I have tried using something similar to this, but as I have so few vertices initially coloured, I just end up with a black model with colours spots: https://forum.unity.com/threads/standard-shader-with-vertex-colors.316529/

My question: is it possible to do it in this way? If not, is there another way? I can’t seem to find one.