-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add support for custom morphing #9550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| bool hasPositions() const noexcept; | ||
| bool hasTangents() const noexcept; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two could be inline too.
filament/src/details/View.cpp
Outdated
| engine.getZeroTexture(), {}); | ||
|
|
||
| if (UTILS_UNLIKELY(skinning.handle || morphing.handle)) { | ||
| if (UTILS_UNLIKELY(skinning.handle)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change makes me nervous. before if you had only morphing enabled, the skinning descriptors were set, but not anymore. I think this part doesn't need to change at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you're right. To make the behavior consistent, I reverted this part of changes.
I think this sounds reasonable. Let me create a PR to separate the struct first and will address these comments later on. |
ac85cd4 to
f2c2cda
Compare
| FILAMENT_CHECK_PRECONDITION(mPbHandle) | ||
| << "setPositionsAt() called on a MorphTargetBuffer without a position buffer. Use " | ||
| "withPositions(true) in the Builder."; | ||
| if (!mPbHandle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you'd need this if you already have the precondition.
| FILAMENT_CHECK_PRECONDITION(mPbHandle) | ||
| << "setPositionsAt() called on a MorphTargetBuffer without a position buffer. Use " | ||
| "withPositions(true) in the Builder."; | ||
| if (!mPbHandle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
| FILAMENT_CHECK_PRECONDITION(mTbHandle) | ||
| << "setTangentsAt() called on a MorphTargetBuffer without a tangent buffer. Use " | ||
| "withTangents(true) in the Builder."; | ||
| if (!mTbHandle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| bool skinning, bool morphing, bool contactShadows, bool hasInstanceBuffer, | ||
| bool skinning, uint8_t morphing, bool contactShadows, bool hasInstanceBuffer, | ||
| uint8_t channels) noexcept { | ||
| uint32_t morphingFlags = uint32_t(morphing) << 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: const
BUGS=[443321184]