mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
fine tune the recent changes to be able to return to rendering of the hfm::Mesh loaded, not the shapes yet
This commit is contained in:
parent
a1e602b54b
commit
001718224e
1 changed files with 5 additions and 3 deletions
|
@ -95,7 +95,7 @@ void buildGraphicsMesh(const hfm::Mesh& hfmMesh, graphics::MeshPointer& graphics
|
|||
HIFI_FCDEBUG_ID(model_baker(), repeatMessageID, "BuildGraphicsMeshTask -- The number of indices and weights for a deformer had different sizes and have been trimmed to match");
|
||||
}
|
||||
// Record cluster sizes
|
||||
const size_t numVertClusters = reweightedDeformers.indices.size() / reweightedDeformers.weightsPerVertex;
|
||||
const size_t numVertClusters = (reweightedDeformers.weightsPerVertex ? hfmMesh.clusterIndices.size() / reweightedDeformers.weightsPerVertex : 0);
|
||||
const size_t clusterIndicesSize = numVertClusters * clusterIndiceElement.getSize();
|
||||
const size_t clusterWeightsSize = numVertClusters * clusterWeightElement.getSize();
|
||||
|
||||
|
@ -404,8 +404,10 @@ void BuildGraphicsMeshTask::run(const baker::BakeContextPointer& context, const
|
|||
uint16_t numDeformerControllers = 0;
|
||||
if (reweightedDeformers.weightsPerVertex != 0) {
|
||||
uint32_t dynamicTransformIndex = dynamicTransformPerMesh[i];
|
||||
const hfm::DynamicTransform& dynamicTransform = dynamicTransforms[dynamicTransformIndex];
|
||||
numDeformerControllers = (uint16_t)dynamicTransform.deformers.size();
|
||||
if (dynamicTransformIndex != hfm::UNDEFINED_KEY) {
|
||||
const hfm::DynamicTransform& dynamicTransform = dynamicTransforms[dynamicTransformIndex];
|
||||
numDeformerControllers = (uint16_t)dynamicTransform.deformers.size();
|
||||
}
|
||||
}
|
||||
|
||||
// Try to create the graphics::Mesh
|
||||
|
|
Loading…
Reference in a new issue