How efficient do You use your texture units

Hi

Some time ago all Graphiccards had 2 Texture Units (from Voodoo 2 to GeForce2) only the relatively new Radeon and the new GeForce3 have more.
Does anybody think of Cards with more then two texture units. For example a Situation, where you put 4 Textures on to an object (Base,light,detail,shadow). Do you implement all the posssible setups like :

  1. 4 passes with 1 Tex Unit
  2. 2 passes with 2 Tex Units
  3. 1 pass with 4 Tex Units

And if you make some of the textures variable for the user, would you use the version 1 pass with 3 Tex Units if only three textures are used ?

This is just a question of interest, cause it costs some writing to get all the possibile combinations, and what about future cards which have 8 Tex Units ?

Is it worth it to think about all the possibilitys or is it just important to support single and doubletexturing, or maybe only doubletexturing?

Lars

What about a shader/material system… where a material(let’s call it that) has a list over all it’s sub textures.
if you then store maxTextureUnits, divide that with the total count of textures, howManyTimes.
Use a while() loop for howManyTimes, then another while() loop to set up all texture units and then draw the object.
just until no more textures is left.

You get me?

Lars wrote

And if you make some of the textures variable for the user, would you use the version 1 pass with 3 Tex Units if only three textures are used ?

If you decide to allow user to modify some textures just decide to give him/her the full power of your texturing system. So there is no need to break your texturing system into mutliple user-related sub-systems.

About the texturing strategy : use the TMUs that are available (glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint *)&nb_tmu)) then render the remaining stage with multi-passe(s).