Hi !
In order to reduce the amount of textures in my game I tried to use shaders instead of multiple textures. The goal is to achiev color swap of my units (same sprtisheet for different factions). The hue shifting shader is already working great and takes a parameter to select the desired shift (1 to red, 2 to green…).
My game is in isometric 2D. Sprites of tiles and units are drawed in the same spritbatch because I need to order them front to back with calculated depth according to position on the grid.
What I try to achiev is to draw each sprite or tile with a specific hue param. What I get is the whole scene drawed with the last passed param because this is how batchs are working… Distinct spritbatchs create artificial layering according to the exectuion order.
I there any way to achiev what I try to do or should I keep with multiple pre generated textures ?
Thanks for your help.
Franck