History

redo unsafe optimization

Ken Cooke committed 9 years ago

Commit a5571bd1 parent 44c1f851 file · +1 −7Browse files

Showing the changes to libraries/render-utils/src/Model.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/Model.cpp+1−7
@@ -1178,13 +1178,7 @@ void Model::updateClusterMatrices() { · 1177 unmodified lines
1178 for (int j = 0; j < mesh.clusters.size(); j++) {1178 for (int j = 0; j < mesh.clusters.size(); j++) {
1179 const FBXCluster& cluster = mesh.clusters.at(j);1179 const FBXCluster& cluster = mesh.clusters.at(j);
1180 auto jointMatrix = _rig->getJointTransform(cluster.jointIndex);1180 auto jointMatrix = _rig->getJointTransform(cluster.jointIndex);
1181#if (GLM_ARCH & GLM_ARCH_SSE2) && !(defined Q_OS_MAC)1181 glm_mat4u_mul(jointMatrix, cluster.inverseBindMatrix, state.clusterMatrices[j]);
1182 glm::mat4 out, inverseBindMatrix = cluster.inverseBindMatrix;
1183 glm_mat4_mul((glm_vec4*)&jointMatrix, (glm_vec4*)&inverseBindMatrix, (glm_vec4*)&out);
1184 state.clusterMatrices[j] = out;
1185#else
1186 state.clusterMatrices[j] = jointMatrix * cluster.inverseBindMatrix;
1187#endif
1188 }1182 }
1189 1183
1190 // Once computed the cluster matrices, update the buffer(s)1184 // Once computed the cluster matrices, update the buffer(s)