Here is what I am wanting to do, the basic idea is to create a colormap and a 2D sprite and perform a per-province palette-swap in the sprite's fragment shader based on the province's RGB value.
Conceptually, you'd keep two textures, a colormap texture, and a lookup texture. The colormap could be whatever size you want, but the lookup texture has to be of size 4096*4096.
Think about this in the use of Games such as Risk, Civ V, Heroes of Iron and many others. where irregular shapes gets selected and their color changed.
Could you please show me some sample code to do this, please? Thanks!