Have an Android application running Libgdx with many sprites all floating around. Currently I colour them all differently depending on which group they belong to, eg "red", "green", "blue" etc. However, I think I'd prefer to only colour part of the sprite instead of the whole thing.
Currently I use:
batch.begin();
batch.setColor(color1);
batch.draw(group1);
batch.setColor(color2);
batch.draw(group2);
etc..
batch.end();
batch.setColor(color)
used to colour the batch and apply that to the whole sprite. When that group is done, I change the colour and move to the next group. I reset the batch colour when done with the groups.
Is there a shader/blender way of only colouring part of the sprite instead? For example, anything that's coloured red in my texture should be treated as a "dynamic area" that can then be coloured to whatever I dynamically set.
I can't use transparency as the edges of the textures are transparent and need to remain that way for blending.
Many thanks