I’ve been making changes to the base scene object. Now there is a flag that you can use to render the current scene object after all of the children have been rendered, instead of the other way around. This was needed due to the way mesh skinning is performed. All of the bones (i.e. matrices used to influence the vertices) are added as children to the mesh itself. The combined transform for all of these bones need to be calculated prior to rendering the skinned mesh. A new object called a Matrix Palette was added to the mesh scene object. It’s used to setup, and update, all of these bone transforms.
For the blend indices, we need to compensate for the lack of UBYTE4 on older hardware, so we use the UINT32 data type instead of UBYTE4. In the shader hardware it’s going to end up being interpreted as a color and converted into 4 floats, instead of a single 32-bit integer. Thus, we will need to swizzle and scale the components back into the original 4 unsigned bytes. This really feels like a serious hack to me; but after hours of searching the Internet, it’s apparently the only way it can be done using older hardware.
Some small changes were made to the helper functions that handle vertex declarations. There were some instances where en element would not be detected, if the data type is different than normally expected. For example, a position element may have been padded into a 4 element tuple; instead of using a 3 element tuple, the default.