generic vertex attributes and datatypes

hi
i just tested some things out and wanted to know if there is a consistent explanation for the results i got.

i am using generic vertex attributes in a vertex program to store matrix indices to do some skinning.
all data for one model is stored in one VBO (the arrays are not interleaved)
first i used GL_UNSIGNED_BYTE as datatype for my matrix indices. that slowed everything down quite a bit, but i thought that that might be ok since im not really experienced with vertex programs and VBO, but now that i switched the datatype to GL_FLOAT i get more than double the fps than before which was quite dazzling to me since floats are much bigger than BYTES and they have to be converted to integer numbers anyways since i have to use them for indirect adressing matrices…

so my question is, did i simply do something wrong with the VBO by mixing FLOAT and BYTE data in one object and thus might i get even more performance if u use BYTES and store them in a different object, or is this simply because the hw cant handle integer numbers very well.

[edit]
oh and i totally forgot im using a radeon 9700 with the newest cataclyst drivers (v3.6)

[This message has been edited by Chuck0 (edited 07-19-2003).]

Using bytes at all kills any performance gains you might think you’re getting. The hardware only understands floats, so the drivers have to go in and turn your bytes into floats themselves.

Sorry to resurrect an old thread, but I’m trying to do the same thing Chunk0 is doing - using ubytes for my matrix indices. It doesn’t make sense to use up so much bandwidth transfering floats when you could use ubytes. Is there any way around this?

If you were using a vertex shader and passed in your matrix indices as a color (ie. 4ub), would that still make a difference? From reading Nvidia’s old performance doc, I thought cards were accelerated to handle float & ushorts for attibutes and additionally 4ub for colors? ATIs 9700 performance guide says 4ub is a native format, but there’s no info about earlier cards…

Floats (and bytes for colors) are the only thing you can assume are accelerated. Anything else may or may not be.

ATi released a document explaining which formats R300-based cards accelerate. But, unless you have a document for all of the cards you’re interested in, you can’t know what is or isn’t accelerated.

Alright, color ubytes for matrix indices it will have to be. Thanks Korval!

In my experience, shorts are often hardware accelerated, in addition to single precision floats, and ubytes for the special case of primary or secondary color. Note that secondary color traditionally doesn’t have an alpha component.

Originally posted by jwatte:
In my experience, shorts are often hardware accelerated, in addition to single precision floats, and ubytes for the special case of primary or secondary color. Note that secondary color traditionally doesn’t have an alpha component.

short for vertex, texcoord, normals are hw accelerated? Probably not.

For indices, I guess NV wants only short, but ATI works with both.