In our Map Tile application, there is one texture that will be universal and shared by all Tiles the same (it’s like a static lookup table).
For efficiency-sake, we’d like to avoid having Urho3D set this Texture Unit individually for each Tile instance. They will all be using a clone of the same Material, but each one will have some material settings that are specific to that instance, and some settings that are shared. Each Tile will have one Texture that is unique to that Tile, but for ALL TILES, they will have one texture that is set the SAME for all Tile instances.
Is there a way to specify this ONE SHARED TEXTURE without having Urho3D thinking “it might be different” (we figure Urho has to do work in setting up the Draws for each Tile, and would like for it to “skip this logic” for that shared texture… just set it once, and then forget.
If not, then we’ll just set this texture the same for each Tile instance, and accept the performance hit. Likely the hit will be negligible, so this probably isn’t a big deal. It’s just that if there is an easy way to optimize this, then we should probably optimize it, saving CPU cycles for Urho.
NOTE: We’re not concerned about the time to call “SetShaderParameter”, but rather are concerned with the Urho engine code that may have to keep setting this same texture for 100 Tiles, every render frame. I hope I’m explaining this clear enough.