Matrix mul is expensive. Affine transform is not. Do the latter instead.
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user