Changing texture via vertex colors?

Is it possible to set a texture based on the colors of a vertex and if so how?

Can you explain a bit more what exactly you want to do ?

If you want to color your object using vertex colors you can use:



MaterialState.setColorMaterial(MaterialState.ColorMaterial)

Throwing a wild guess… You're trying to texture terrain and you want to use rock texture where the vertex color is brown, use grass texture where vertex color is green etc.

It's possible, but requires a shader. A better solution might be texture splatting, where the textures are blended using alpha maps.