I was just thinking…
Most modern 3d games (and most likely all future games) draw the same polygon multiple times with different textures and different blend modes…
Yet, most cards only support 2 (or 3) multitexture units.
The problem is that blending between those texture units is so different from blending the results of all those texture units with the frame buffer…
It would be nice if the whole way multitexturing worked was that it would be trivial to make a system where you would get the same result if you used multiple single layers or multitexturing.
Right now it’s complex because blending between texture units is fundementally different (and more restricted) than blending textures with the frame buffer…
Anyway, a thing that struck me is the waste of re-drawing the same polygon when redrawing several layers…
The thing is, the T&L chip (or part of the chip or whatever) recalculates the polygon everytime you draw it (sure it has a cache, but when you draw a lot of polygons, and you sort per texture, it’s probably not in the cache anymore)
But what if you had an endless ammount of texture units?
You would be able to reuse that geometry data over and over again, only being limited by the texture memory (which you should be carefull with anyway) which is required for all the textures of all the layers…
I can see you thinking “endless amount of texture units?? dream on!”
Give me a sec to explain…
As far as i know the biggest bottleneck in the chip itself is the geometry transformation because it’s hard to do in parallel…
The software implementation of texture units works something like this.
You calculate what a certain pixel looks like and you feed the result to the next unit and it blends it with the pixel it calculates and so on…
Now suppose you could feed back the end result of your last texture unit back into your first texture unit?
Sure, it might be slightly harder to schedule, it would probably require some specific hardware, and your texture caching might not be that efficient anymore…
But you wouldn’t have to recalculate the same polygon again and again, and you would have to send fewer commands and geometry to your video card…
And ofcourse it would make the life of programmers like myself a lot easier