Skip to main content
gamedev.net
🔒 Locked

Change player color

Started by oenda 2 replies 1.3k views
Original Post
oenda
oenda

Hi.I am developing a 2D strategy game like AoE 2.I need to change player color on sprites.How can i do that?

Thanks.

kauna
kauna

Use 8-bit alpha maks which define the color changing regions. In the default version of the sprite, color the changing areas as white. In the pixel shader, modulate the sprite texel with the desired unit color and then lerp between the original sprite color and the modulated sprite color according to the alpha map.

Cheers!

oenda
oenda

Sorry for late post.I will try it.Thanks :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.