Right now I'm working on getting a skeletal animation system integrated into my game but I'm starting to realize that the extra data carried per vertex could mess up the 64 byte alignment of my vertex structure. But then I thought that since normals and tangents are generally guaranteed to contain numbers between -1.0 and 1.0 that I might be able to get away with using formats to store this data with smaller formats and therefore being able to fit all the data in 64 bytes. The problem I encountered is that C++ doesn't have a half float type and half floats aren't supported below OpenGL 3.0. Theoretically I could use scaled 16-bit integers but this would add extra computations in the vertex shader to re-scale them. Right now my structure contains:
struct meshVertex
{
float x, y, z; //12 bytes for position
float u, v; //8 bytes for texcoords
float nX, nY, nZ; // 12 bytes for normals
float tX, tY, tZ, tW; //16 bytes for tangents
unsigned short b1, b2, b3, b4; //8 bytes of bone IDs
float w0, w1, w2, w3; //16 bytes for bone weights
};
that adds up to 72 bytes which is 8 bytes too much. Can anybody post what their animated vertex structure looks like? Does anyone have any other methods for decreasing the size of the vertex structure?