I am making an old-school 2d game, and I want to animate a specific color in my texture.
Only ways I know are:
- opengl shaders.
- animating one color channel only.
- white texture under the color-animated texture.
But I don’t want to use shaders, I want to make this game as simple as possible, not many extra openGL functions etc..
And the color channel animating doesnt fit this because I need all color channels in my textures.
Currently I am doing it with 2 textures: white texture under the other texture, translated the specific pixel color into transparent, then I change white texture color with glColor3f() function to what ever I want, and I see the ‘palet animation’ on that specific color.
But that style sounds pretty hacky, so I am wondering if there is some better trick to this?
How about just using paletted textures? There are extensions to do just that. If using extensions is out of question you can just make palette handling by your own. Just do your palette tricks, there are lot of them, and just write RGB texture using palette. Ofcourse this limits number of colors, but thats whole point of using palette.
Paint programs that are good for palette handling are nowadays rare. That’s why I will not remove Deluxe Paint from my drive.