Description
Bevy version
0.16
Relevant system information
2025-05-28T13:21:01.933062Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA RTX A2000 Laptop GPU", vendor: 4318, device: 9656, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "553.62", backend: Vulkan }
2025-05-28T13:21:02.086063Z INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
What you did
I upgraded from 0.15 to 0.16. This worked without flicker before.
What went wrong
I wrote a clustered terrain generator for a strategy game (WIP). The terrain can be changed during gameplay.
After a cluster has been updated, I retrieve the meshes of the adjacent terrain clusters to average the normals at the borders between the clusters.
Starting with 0.16 just retrieving the mesh (independent if I change the mesh or not) to modify it by
if let Some(other_mesh) = meshes.get_mut(other_mesh_handle) {[....]}
creates a flickering mesh. It looks like that another mesh is displayed for a single frame, before the correct mesh is displayed again.
Additional information
screencap.mp4
In this example I am not altering the adjacent meshes. I am just retrieving a mutable borrow from the AssetServer.
If I only retrieve an immutable borrow the flicker disappears.