Specifically, say I have three vertices of my mesh with different temperatures of 500K 800K and 1300K, and and array of colors indexed by temperature (ar[temp]=Color) I want the color at any point in each triangle of the mesh to be the color of the linearly interpolated temperature from the vertices, instead of interpolating the color.
Since temperature is effectively a single value per vertex then you might be better off using a one dimensional texture and just set the texture coordinates to (0, t/tMax) (presuming the 1D texture is vertical).
Then you will have extremely fine control over the color of every temperature in the range.
Edit: also presumes you don’t also want a regular diffuse texture.
So the cutting and stretching “triangles” (in quotes since, as you point out, they are 1 dimensional) out of texture atlases is something I can do? I always have a hell of a time understanding Java apis.
No cutting necessary. Make a big one pixel wide texture where every ‘y’ value is a color for your temperatures from lowest to highest.
Then set texture coordinates for each vertex to (temperature, 0) where temperature is a value adjust to 0…1 for minTemperature and maxTemperature.
Nothing else needs to be done as the texture coordinates are already interpolated between vertexes… that’s how texture mapping works. At each point on the triangle there will be a texture coordinate interpolated to some (temperature, 0) value… that will relate directly to your 1 dimensional texture.
It already supports it as I understand… though it might be limited to certain platforms and might not necessarily be what you are looking for since it doesn’t really have anything at all to do with the conversation so far.