I would like to draw many triangles, where the 'color' of each is really in index into an internal CPU-side data structure.
Is there any easy (fast way) to change the color (index) of every triangle rendered? I thought of using an uninterpolated texture, but I need indices in the 10,000's.
I realise the pixel shader can't reference a value from another one, but I thought a vertex type of (x, y, z, i)
would work.
I've tried Ubuntu, OSX with OpenGL and ended up with the complexity of DX11/12 on Windows.
I tried with Unity3d and failed (needed C++ plugin so why bother) and unsure how to do this in OpenGL.