For curiosity sake, has anyone tried using a per-vertex index or weight value to do a VP table lookup for normals, colors, etc… as one would with matrix blending?
I figure it’s not a huge win (or could easily be a loss), as it still requires a full-sized dummy normal array to be bound, loaded, and overridden in the VP…
However, if you really wanted to cram a VP table of shared normals, colors, and/or texcoords at minimal cost, you could pack the indexWeight into your vertex as:
vertex { x , y, z, indexWeight }
and then bind dummy normals, colors, and/or texcoords to the SAME vertex pointers (aliased, in the same VBO so there’s no extra transfer), relying on the VP to stuff the correct output value from your LUT based on the given weight/index.
The biggest limitation, then, is what fits in VP registers – on older cards, on the order of tens to hundreds of unique normals, colors, texcoords AT BEST. However, if your index/weight param(s) are sent as ubyte[4], then you could separately index up to 256 normals, texcoords, colors, etc…, if they all fit.
And if they didn’t fit, then you could perhaps define 4 ubyte indices/weights to find, blend* and normalize 2-4 unique basis vectors in VP registers, to get the complete spectrum – less precision than float[3] normals but much more than sending quantized normals of type byte[3], which generally sucks. Not recommended for colors, which are usually 8 bit anyway.
But unless there’s a transfer bottleneck or you’re animating/cycling normals in some special way, best to stick with “the usual way.”
[* the idea being some part of the index/weight finds one of N unique basis vectors, while the other part indicates the weight]