I'm trying to do the next (it seems to be done by a partner here):
I want to make a game where i can change color pixels of textures (Arcade retro ... ) , but i have a big stick problem:
I have one big texture ( 256 * 4096 (1024 x 1024 equivalent) and i need to extract from there parts (regions) , and change the color of them with a palette in order to use it in the game.
We have some alternatives :
- We can throw out game color change and make each sprite with its colors (pain and memory headeach)
- We can continues with our idea , then we have this alternatives:
* Use a Pixmap for all the game (256x224 arcade size)
The problem which comes with this is that i must extract region and throw it to a pixmap ,and Pixmaps doesn't work with Pixmaps , then i must copy each texture .
* Use shaders with an uniform var palette (png)
I have tried this way , but spritebatch doesn't goes well when you must atach another shader with vars you must send.
I's ok , but i couldn't make it (i have the shaders done) using spritebatch , the only way is using mesh render to do it.
* Having indexed pngs
I think this is not supported by libgdx , then i can't think going this way.
My problem , i don't know what is the best option , and fighting with shaders , anyone can show me an example of passing uniforms and using spritebatch? (no mesh rendering directly)
Any help? , new ideas are wellcome , and i'll be greated for your time.
Sorry for my bad english