Showing the changes to libraries/render-utils/src/Model.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1178,6 +1178,7 @@ void Model::updateClusterMatrices() { · 1177 unmodified lines | |||
| 1178 | if (!_needsUpdateClusterMatrices || !isLoaded()) { | 1178 | if (!_needsUpdateClusterMatrices || !isLoaded()) { |
| 1179 | return; | 1179 | return; |
| 1180 | } | 1180 | } |
| 1181 | |||
| 1181 | _needsUpdateClusterMatrices = false; | 1182 | _needsUpdateClusterMatrices = false; |
| 1182 | const FBXGeometry& geometry = getFBXGeometry(); | 1183 | const FBXGeometry& geometry = getFBXGeometry(); |
| 1183 | for (int i = 0; i < (int) _meshStates.size(); i++) { | 1184 | for (int i = 0; i < (int) _meshStates.size(); i++) { |
| @@ -1187,7 +1188,6 @@ void Model::updateClusterMatrices() { · 3 unmodified lines | |||
| 1187 | const FBXCluster& cluster = mesh.clusters.at(j); | 1188 | const FBXCluster& cluster = mesh.clusters.at(j); |
| 1188 | auto jointMatrix = _rig.getJointTransform(cluster.jointIndex); | 1189 | auto jointMatrix = _rig.getJointTransform(cluster.jointIndex); |
| 1189 | #if defined(SKIN_DQ) | 1190 | #if defined(SKIN_DQ) |
| 1190 | // AJT: TODO: optimize | ||
| 1191 | glm::mat4 mat; | 1191 | glm::mat4 mat; |
| 1192 | glm_mat4u_mul(jointMatrix, cluster.inverseBindMatrix, mat); | 1192 | glm_mat4u_mul(jointMatrix, cluster.inverseBindMatrix, mat); |
| 1193 | state.clusterTransforms[j] = TransformDualQuaternion(mat); | 1193 | state.clusterTransforms[j] = TransformDualQuaternion(mat); |