Merge pull request #15251 from SamGondelman/animation82

Case 21888: Revert changes that impacted animation performance
This commit is contained in:
Sam Gondelman 2019-03-27 10:50:43 -07:00 committed by GitHub
commit 3c42cb34ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 14 deletions

View file

@ -178,7 +178,6 @@ void CauterizedModel::updateClusterMatrices() {
} }
} }
} }
computeMeshPartLocalBounds();
// post the blender if we're not currently waiting for one to finish // post the blender if we're not currently waiting for one to finish
auto modelBlender = DependencyManager::get<ModelBlender>(); auto modelBlender = DependencyManager::get<ModelBlender>();

View file

@ -1346,19 +1346,14 @@ void Model::updateRig(float deltaTime, glm::mat4 parentTransform) {
} }
void Model::computeMeshPartLocalBounds() { void Model::computeMeshPartLocalBounds() {
render::Transaction transaction; for (auto& part : _modelMeshRenderItems) {
auto meshStates = _meshStates; const Model::MeshState& state = _meshStates.at(part->_meshIndex);
for (auto renderItem : _modelMeshRenderItemIDs) {
transaction.updateItem<ModelMeshPartPayload>(renderItem, [this, meshStates](ModelMeshPartPayload& data) {
const Model::MeshState& state = meshStates.at(data._meshIndex);
if (_useDualQuaternionSkinning) { if (_useDualQuaternionSkinning) {
data.computeAdjustedLocalBound(state.clusterDualQuaternions); part->computeAdjustedLocalBound(state.clusterDualQuaternions);
} else { } else {
data.computeAdjustedLocalBound(state.clusterMatrices); part->computeAdjustedLocalBound(state.clusterMatrices);
} }
});
} }
AbstractViewStateInterface::instance()->getMain3DScene()->enqueueTransaction(transaction);
} }
// virtual // virtual
@ -1391,7 +1386,6 @@ void Model::updateClusterMatrices() {
} }
} }
} }
computeMeshPartLocalBounds();
// post the blender if we're not currently waiting for one to finish // post the blender if we're not currently waiting for one to finish
auto modelBlender = DependencyManager::get<ModelBlender>(); auto modelBlender = DependencyManager::get<ModelBlender>();