Docs still use naga_oil #{MATERIAL_BIND_GROUP} syntax after WESL switch
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- computer-graphics, documentation
Research direction
Start with the WGSL snippets in the Material trait docs in crates/bevy_pbr/src/material.rs and the AsBindGroup docs in crates/bevy_render/src/render_resource/bind_group.rs, then check the example shaders in assets/shaders/ for the WESL form constants::MATERIAL_BIND_GROUP. Also fix the 'group 2' wording in bind_group.rs to match MATERIAL_BIND_GROUP_INDEX (3). Done means no naga_oil #{MATERIAL_BIND_GROUP} remains in the four listed locations and the examples still compile. Confirm with a maintainer whether the author's branch should be used as the PR.
Written by the indexing model from the issue text.
Description
Since 0.20 moved Bevy's shaders to WESL (#25088), the naga_oil #{MATERIAL_BIND_GROUP}
substitution no longer works, but a few doc comments and examples still show it. Copying the
snippet from the Material docs into a 0.20 shader fails to compile.
The WESL form is constants::MATERIAL_BIND_GROUP, which is what the example shaders in
assets/shaders/ already use.
Places that still have the old syntax (on main):
crates/bevy_pbr/src/material.rs: the WGSL snippet in theMaterialtrait docs (docs.rs)crates/bevy_render/src/render_resource/bind_group.rs: several snippets in theAsBindGroupdocs (docs.rs)examples/shader/extended_material_bindless.rs: doc commentsexamples/shader_advanced/texture_binding_array.rs: comments inspecialize
bind_group.rs also says material bind groups "are generally bound to group 2", but
MATERIAL_BIND_GROUP_INDEX is 3.
I have a branch with the replacements here if it's useful:
https://github.com/bevyengine/bevy/compare/main...ShaneBreazeale:bevy:docs-wesl-material-bind-group
I'm happy to open it as a PR if you like.
AI disclosure: I used an AI coding agent to find these occurrences and to draft both the branch
changes and this issue text. I've reviewed the changes myself.
- Dominant language
- Rust
- Stars
- 49.2k
- Forks
- 5k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 136
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bevyengine/bevy
-
A-Camera C-Docs D-Straightforward S-Ready-For-Implementation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bevyengine/bevy#26309 ·
Maintainers usually reply within 2 days
-
A-Rendering C-Bug C-Performance S-Ready-For-Implementation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bevyengine/bevy#26283 · 3 comments ·
Maintainers usually reply within 2 days
-
A-Dev-Tools C-Bug D-Straightforward S-Ready-For-Final-Review X-Uncontroversial
Difficulty 1/5 Under an hour Newbie friendliness 87/100
bevyengine/bevy#26275 · 1 comment ·
Maintainers usually reply within 2 days
-
Feathers number input keeps its editing text when editing ends without a changePossibly taken @femii1234 claimed this 3 days ago. OpenA-UI C-Bug D-Trivial S-Needs-Review
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy#26202 · 1 comment ·
Maintainers usually reply within 2 days
-
C-Feature S-Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bevyengine/bevy#26153 ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
rust-embedded/heapless#694 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
farion1231/cc-switch#8899 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
manuscript-lang/manuscript#1364 ·
Maintainers usually reply within 1 day