Add base vertex uniform count.#2886
Conversation
WalkthroughA new static member Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: Extracts the base vertex-uniform-vector budget used for skinning into a shared constant and applies it in the joint-count calculation. 🤖 Was this summary useful? React with 👍 or 👎 |
| // directly use max joint count to avoid shader recompile | ||
| // @TODO: different shader type should use different count, not always 44 | ||
| const remainUniformJointCount = Math.ceil((this._maxVertexUniformVectors - (44 + bsUniformOccupiesCount)) / 4); | ||
| const remainUniformJointCount = Math.ceil( |
There was a problem hiding this comment.
Using Math.ceil here can overestimate remainUniformJointCount when the available uniform-vector budget isn’t divisible by 4, which may make RENDERER_JOINTS_NUM exceed MAX_VERTEX_UNIFORM_VECTORS and cause shader compile failures on some devices. Consider rounding down instead of up so the computed joint limit always stays within the reported uniform budget.
🤖 Was this useful? React with 👍 or 👎
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev/2.0 #2886 +/- ##
===========================================
- Coverage 83.22% 82.95% -0.28%
===========================================
Files 796 796
Lines 90434 90441 +7
Branches 9496 9476 -20
===========================================
- Hits 75266 75027 -239
- Misses 15086 15332 +246
Partials 82 82
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.