I'm using LibGDX on top of OpenGL and currently my game engine does something along the lines of the following per frame
- Bind a terrain texture sprite atlas and a set of transparency masks in another texture atlas
- Render terrain tiles using the 2 bound textures to a FBO
- Bind a character and item texture sprite atlas
- Render characters over the terrain to the same FBO
- Bind the same transparency mask atlas and a normal map texture for the terrain
- Draw the same terrain tiles' normal map version to a different FBO
- Bind the character and item normal map texture atlas
- Render character normal maps over the terrain normal map FBO
- Bind this normal map FBO as a texture
- Render lighting information to a different FBO using the normal map texture information
- Bind the diffuse and lighting FBOs as textures
- Use these to render the combined final image to the main display
So in summary, each frame I'm binding a total of 9 different textures, one or two at a time.
Should I look into changing my code so all 9 textures are always bound, and the correct one is referenced at the right time? Or is this a reasonable amount of texture binds per frame that isn't going to impact overall performance to a noticable effect? Assume I'm aiming for 60fps and there's a fair amount of other calculations going on per frame.