mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 07:34:02 +02:00
Merge pull request #16277 from sabrina-shanman/instancing_too-many-deformers
Fix skinning deformer data always being added to graphics::Mesh
This commit is contained in:
commit
a83d2b4561
1 changed files with 5 additions and 1 deletions
|
@ -12,8 +12,12 @@
|
|||
#include "ReweightDeformersTask.h"
|
||||
|
||||
baker::ReweightedDeformers getReweightedDeformers(size_t numMeshVertices, const std::vector<const hfm::Deformer*> deformers, const uint16_t weightsPerVertex) {
|
||||
size_t numClusterIndices = numMeshVertices * weightsPerVertex;
|
||||
baker::ReweightedDeformers reweightedDeformers;
|
||||
if (deformers.size() == 0) {
|
||||
return reweightedDeformers;
|
||||
}
|
||||
|
||||
size_t numClusterIndices = numMeshVertices * weightsPerVertex;
|
||||
reweightedDeformers.weightsPerVertex = weightsPerVertex;
|
||||
// TODO: Consider having a rootCluster property in the DynamicTransform rather than appending the root to the end of the cluster list.
|
||||
reweightedDeformers.indices.resize(numClusterIndices, (uint16_t)(deformers.size() - 1));
|
||||
|
|
Loading…
Reference in a new issue