Skip to content

Commit

Permalink
fix/remove wrong asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflinger authored and bejado committed May 17, 2024
1 parent b4c33d2 commit 7ba437b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions filament/src/components/RenderableManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,15 +966,13 @@ void FRenderableManager::setMorphWeights(Instance instance, float const* weights

void FRenderableManager::setMorphTargetBufferAt(Instance instance, uint8_t level,
size_t primitiveIndex, FMorphTargetBuffer* morphTargetBuffer, size_t offset, size_t count) {
assert_invariant(offset == 0 && "Offset not yet supported.");
assert_invariant(count == morphTargetBuffer->getVertexCount() && "Count not yet supported.");
if (instance) {
assert_invariant(morphTargetBuffer);

MorphWeights const& morphWeights = mManager[instance].morphWeights;
ASSERT_PRECONDITION(morphWeights.count == morphTargetBuffer->getCount(),
ASSERT_PRECONDITION(morphWeights.count == count,
"Only %d morph targets can be set (count=%d)",
morphWeights.count, morphTargetBuffer->getCount());
morphWeights.count, count);

Slice<MorphTargets>& morphTargets = getMorphTargets(instance, level);
if (primitiveIndex < morphTargets.size()) {
Expand Down

0 comments on commit 7ba437b

Please sign in to comment.