Open
Description
Bevy version 0.16.0
System information
AdapterInfo { name: "AMD Radeon Graphics (RADV RENOIR)", vendor: 4098, device: 5708, device_type: IntegratedGpu, driver: "radv", driver_info: "Mesa 25.1.4", backend: Vulkan }
Step to reproduce
Use a same material for different entities with Mesh3d
. Then remove the Mesh3d
component from one of them.
#[derive(Component)]
struct Marked;
commands.spawn((
Transform::default(),
Mesh3d(sphere.clone()),
MeshMaterial3d(material.clone()),
));
commands.spawn((
Marked,
Transform::default(),
Mesh3d(sphere.clone()),
MeshMaterial3d(material.clone()),
));
fn delete_mesh3d(mut commands: Commands, marked: Single<Entity, With<Marked>>) {
commands.entity(*marked).remove::<Mesh3d>();
}
Expected behavior
The entity whose Mesh3d
was removed, no longer renders. All the others still do and no warning is raised.
Actual behavior
Most entities sharing the same material as the entity whose Mesh3d
was removed, stop being rendered. No warning nor error is reported. Not all entities are affected and the behavior seems to not be deterministic.