Original Post
Hi, I am trying to render a complex object consisting out of several subobjects (each with its own set of vertices) with 1 rendercall and am wondering how I should handle the animation (and therefore different matrices) of the subobjects. I think I will give every subject its own transformation matrix that I set before rendertime and index which one to use from the vertexdata. I considered using D3DFVF_XYZB1 for that but using a whole float for a simple index seems kind of wasteful. Especially considering that I might want to give other data along as well (materialtype for the supershader, etc...) and do not want a vertex to be bigger that 32byte so I considered using the RGBA 4byte encoded specular or diffuse color instead. I could put which matrix to use for each subobject into the R part (have to multiply it with 256 since it ranges from 0 to 1, though) and maybe the materialtype, lights, etc. into the other GBA parts. Is that acceptable, will this maybe cause huge performance loss or did I miss something completely ? Thanks for any advice on this. ^_^