I am attempting to tint a texture a color but I want the texture to show under the tint. For example, I have a picture of a person but I want to tint them a light green and not change the transparency of the actual person itself.

So far I have attempted to use the SpriteBatch method setColor which takes rgba values. When I set the alpha value to .5 it will render the tinting and the texture with that alpha value. Is there any way to separate the alpha values of the tint and the texture?

I know I could draw another texture on top of it but I don't want to have two draw passes for the one texture because it will be inefficient. If there's anyway to do it in raw OpenGL that'd be great too.

  • 2
    \$\begingroup\$ Have you tried putting a low green value ? Something like (0, 0.3f, 0, 1) ? Or does this not do it ? I am saying this because I think that the default color is white so, perhaps white kind of works like transparent, if that makes sense. \$\endgroup\$
    – dimitris93
    Sep 23 '15 at 21:57
  • \$\begingroup\$ Man I feel like a real idiot right now.... idk what I was thinking haha. Thank you. \$\endgroup\$
    – Jmrapp
    Sep 23 '15 at 22:00

You must log in to answer this question.

Browse other questions tagged .