forked from mirrors/0ad
Inline common vector/matrix operations, for performance.
Remove some redundant vector methods. Compute skinning for positions and normals simultaneously. (These changes reduce skinning cost by >50%.) This was SVN commit r8170.
This commit is contained in:
@@ -86,11 +86,8 @@ void ModelRenderer::BuildPositionAndNormals(
|
||||
return;
|
||||
}
|
||||
|
||||
for (size_t j=0; j<numVertices; j++)
|
||||
{
|
||||
Position[j] = CModelDef::SkinPoint(vertices[j], model->GetAnimatedBoneMatrices(), model->GetInverseBindBoneMatrices());
|
||||
Normal[j] = CModelDef::SkinNormal(vertices[j], model->GetAnimatedBoneMatrices(), model->GetInverseBindBoneMatrices());
|
||||
}
|
||||
CModelDef::SkinPointsAndNormals(numVertices, Position, Normal, vertices, model->GetAnimatedBoneMatrices(), model->GetInverseBindBoneMatrices());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user