ну я не знаю как там в hlsl
как то так наверное:
float4x3 mWorldMatrixArray[63] : WORLDMATRIXARRAY;
struct a2v {
float4 position : POSITION;
float3 tangent : TANGENT;
float3 normal : NORMAL;
float4 blendWeights : BLENDWEIGHT; //gets the bone weights
float4 blendIndices : BLENDINDICES; //gets the bone indices
float2 texCoord : TEXCOORD0;
};
// Get the indices and weights and cast
//from a 4D vector to a size 4 array
float weights[4] = (float[4])In.blendWeights;
int4 indexVector = In.blendIndices;
int boneIndex[4] = (int[4])indexVector;
// Calculate blended worldposition
worldPos= mul(In.position, bones[boneIndex[0]]) * weights[0];
worldPos+=mul(In.position, bones[boneIndex[1]]) * weights[1];
worldPos+=mul(In.position, bones[boneIndex[2]]) * weights[2];
// The bones should add up to 1 so the last bone weight is 1
// minus all the other weights
float lastweight = 1.0f - weights[0] - weights[1] - weights[2];
worldPos+=mul(In.position, bones[boneIndex[3]]) * lastweight;
еще раз - зачем тебе знать локальные xyz МАТРИЦЫ? вершины у тебя будет двигать шейдер. тыж отказался от ффп? впрочем даже если ты будешь считать позиции вершин на цпу тебе все равно достаточно будет тупо помножить позицию вершины на матрицу. а исходная позиция у тебя хранится в вершинном буфере. а в буфер она попала из файла. а в файл она попала из пакета 3д моделирования. а в пакет моделирования она попала от моделлера. а моделлер взялся от папы с мамой.