The legacy D3DXOptimizeVertices and D3DXWeldVertices define the vertexRemap as:
The value stored in pVertexRemap for a given element is the source vertex location in the new vertex ordering.
Which would be oldLoc = remap[newLoc]
The DirectXMesh versions are returning this data, but the Remap functions are treating the vertexRemap as the inverse: newLoc = remap[oldLoc]
I think the confusion here stems from the fact that the various ID3DXMesh class operations internally use remaps that are newLoc = remap[oldLoc], but the D3DXOptimizeVertices and D3DXWeldVertices functions explicitly inverse it to oldLoc = remap[newLoc]
The legacy
D3DXOptimizeVertices
andD3DXWeldVertices
define the vertexRemap as:Which would be
oldLoc = remap[newLoc]
The DirectXMesh versions are returning this data, but the Remap functions are treating the vertexRemap as the inverse:
newLoc = remap[oldLoc]