Hi,
I pass in an array of textures into my shader, with a vertex value ("textureIndex") indicating which texture from the array should be used to paint that particular vertex. If my triangle has vertexes which have different selection values the textureIndex is interpolated across the face of the triangle and my PS gets a whole "rainbow" of indexes across the triangle, instead of just the two possible values I want to paint.
Is there any way of instructing the PS how to interpolate values ?
If my verexes have textureIndex of 1,5,5 on my triangle I'd wish my PS to get either 1 or 5 but not 1,2,3,4,5 (and all floats inbetween).
If I'm simply doing things a weird way, that would also be a great answer :-)
Phillip