-
-
Couldn't load subscription status.
- Fork 4.2k
Open
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorP-CrashA sudden unexpected crashA sudden unexpected crashS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Description
Bevy version and features
3ca7b50 (18.0-dev, 2025/10/25)
What you did
Loaded a mesh with morph targets, then spawned it on an entity with Mesh3d and MeshMaterial3d components but no MeshMorphWeights component.
Original Discord report: https://discord.com/channels/691052431525675048/1431281153918111836/1431281153918111836
For a minimal repro, open examples/animation/morph_targets.rs and paste this at the bottom of the play_animation_when_ready function:
for child in children.iter_descendants(scene_ready.entity) {
commands
.entity(child)
.remove::<bevy::mesh::morph::MeshMorphWeights>();
}What went wrong
ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (6)' panicked at .cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wgpu-26.0.1\src\backend\wgpu_core.rs:2391:18:
wgpu error: Validation Error
Caused by:
In a CommandEncoder
In a draw command, kind: MultiDrawIndirectCount
The BindGroupLayout with 'mesh_layout' label of current set BindGroup with 'model_only_mesh_bind_group' label at index 2 is not compatible with the corresponding BindGroupLayout with 'morphed_mesh_layout' label of RenderPipeline with 'pbr_opaque_mesh_pipeline' label
Expected entry with binding 2 not found in assigned bind group layout
Expected entry with binding 3 not found in assigned bind group layout
Additional information
I'm fairly confident this issue is largely the same as #16929. See #18074 for more details.
- The gist of the skinning bug is that one part of the renderer picks the skinning bind group because the mesh has skinning attributes, while another part of the renderer picks the non-skinning bind group because the
SkinnedMeshcomponent is not present.- So if one is present and the other is not then there's a bind group mismatch.
- This morph target bug is probably the same but with morph attributes and a missing
MeshMorphWeightscomponent.- The morph attributes check is in
setup_morph_and_skinning_defs(seeis_morphed). - The
MeshMorphWeightscheck is inextract_morphs.
- The morph attributes check is in
- The fix might be similar to Fix panic when a mesh has skinning attributes but no
SkinnedMeshcomponent #18074 - useMeshMorphWeightsas the source of truth and ignore the morph attributes.
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorP-CrashA sudden unexpected crashA sudden unexpected crashS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong