Matrix mul is expensive. Affine transform is not. Do the latter instead.

This commit is contained in:
Shyotl
2019-03-10 03:48:07 -05:00
parent 6c15ee6556
commit 50007bbc62
2 changed files with 6 additions and 4 deletions

View File

@@ -9773,8 +9773,9 @@ void LLVOAvatar::updateSoftwareSkinnedVertices(const LLMeshSkinInfo* skin, const
LLVector4a& v = vol_face.mPositions[j]; LLVector4a& v = vol_face.mPositions[j];
final_mat.mul(bind_shape_matrix); LLVector4a t;
final_mat.affineTransform(v, pos[j]); bind_shape_matrix.affineTransform(v, t);
final_mat.affineTransform(t, pos[j]);
pos[j].add(av_pos); pos[j].add(av_pos);

View File

@@ -4145,8 +4145,9 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
LLVector4a& v = vol_face.mPositions[j]; LLVector4a& v = vol_face.mPositions[j];
final_mat.mul(bind_shape_matrix); LLVector4a t;
final_mat.affineTransform(v, pos[j]); bind_shape_matrix.affineTransform(v, t);
final_mat.affineTransform(t, pos[j]);
pos[j].add(av_pos); pos[j].add(av_pos);
} }