Karasu_Tomoe
Member
So, in my game project, I made a shader setup that recolors characters according to a local surface that acts as a color lookup table. When drawn, the shader is called, a stage parameter is set as the texture of the CLUT surface and basically remaps the colors from the top row to the colors in the bottom row.
While it does work like it's supposed to, what worries me is that each CLUT is stored as its own texture page. Because of this, regardless of my texture group setup, each character drawn requires at least two textures swaps.
So according to the debug overlay, with say, 50 characters on screen, I'm clocking about 100 texture swaps with 100 vertex batches. If I don't pass any of the CLUTs, it goes back down to 10 swaps (still 100 batches).
I guess my question is, should I be looking for a more efficient way of implementing color remapping? I'm not 100% familiar with the impact of texture swaps. All I really understand is apparently any more than 20 swaps is bad, but I'm not really noticing any major difference in performance. Then again this is mid-performance machine (GeForce GT750M, 8GB RAM).
While it does work like it's supposed to, what worries me is that each CLUT is stored as its own texture page. Because of this, regardless of my texture group setup, each character drawn requires at least two textures swaps.
So according to the debug overlay, with say, 50 characters on screen, I'm clocking about 100 texture swaps with 100 vertex batches. If I don't pass any of the CLUTs, it goes back down to 10 swaps (still 100 batches).
I guess my question is, should I be looking for a more efficient way of implementing color remapping? I'm not 100% familiar with the impact of texture swaps. All I really understand is apparently any more than 20 swaps is bad, but I'm not really noticing any major difference in performance. Then again this is mid-performance machine (GeForce GT750M, 8GB RAM).
Last edited: