Skip to content

docs: explain morph weight limit#24459

Open
YUHAO-corn wants to merge 1 commit into
bevyengine:mainfrom
YUHAO-corn:yuhao/document-morph-weight-limit-15974
Open

docs: explain morph weight limit#24459
YUHAO-corn wants to merge 1 commit into
bevyengine:mainfrom
YUHAO-corn:yuhao/document-morph-weight-limit-15974

Conversation

@YUHAO-corn
Copy link
Copy Markdown

Objective

Document why MAX_MORPH_WEIGHTS is fixed at its current value, matching the existing explanation for MAX_JOINTS.

Fixes #15974.

Solution

  • Move the GPU/platform-limit rationale onto the public MAX_MORPH_WEIGHTS constant.
  • Keep MORPH_BUFFER_SIZE documentation focused on the derived buffer size.

Testing

  • rustfmt +1.93.0-aarch64-apple-darwin --check crates/bevy_mesh/src/morph.rs crates/bevy_pbr/src/render/mesh_bindings.rs
  • git diff --check

Note: cargo +1.93.0-aarch64-apple-darwin check -p bevy_mesh -p bevy_pbr could not run in this environment because crates.io DNS resolution failed while fetching the index.

@github-actions
Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨

@laundmo laundmo added C-Docs An addition or correction to our documentation A-Rendering Drawing game state to the screen labels May 29, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering May 29, 2026
@laundmo laundmo added the D-Trivial Nice and easy! A great choice to get started with Bevy label May 29, 2026
Comment on lines -16 to -20
/// This is used to allocate buffers.
/// The correctness of the value depends on the GPU/platform.
/// The current value is chosen because it is guaranteed to work everywhere.
/// To allow for bigger values, a check must be made for the limits
/// of the GPU at runtime, which would mean not using consts anymore.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems odd to me to remove documentation here. Should probably be left or replaced with a doc-link to the MAX_MORPH_WEIGHTS

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 31, 2026
@alice-i-cecile alice-i-cecile added this to the 0.19 milestone May 31, 2026
@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels May 31, 2026
@alice-i-cecile alice-i-cecile removed this from the 0.19 milestone May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

Document why MAX_JOINTS and MAX_MORPH_WEIGHTS are set

4 participants