Open M1cha opened 11 months ago
Hey. I've faced the same bug while migrating from 0.11.3 to 0.12.1. For me, spawning single shape like this:
commands.spawn(MaterialMesh2dBundle {
mesh: meshes.add(shape::Quad::new(
Vec2::new(100., 100.)
).into()).into(),
material: materials.add(ColorMaterial::from(resource.border_color)),
transform: Transform::from_translation(Vec3::new(
calc_x,
calc_y,
0.
)),
..default()
});
works as expected. But if I add another spawn command, It starts its weird blinking. Moreover, when I had added mouse support for marking shapes It looked like shapes were switching places.
https://github.com/bevyengine/bevy/assets/27972409/7325dc93-2846-4beb-b693-b3699197acba
I'm currently using SpriteBundle as a temporary solution for testing purposes :)
Well, for me I don't see any output from running the 2D shapes example or my own extremely similar implementation on the latest branch (0.12.1 as of now). 0.12.0 works just fine, it's just 0.12.1 that does not. 0.12.1:
0.12.0:
Seems similar to #152? Though that was a loooooong while ago, so maybe a completely different reason?
OS: Windows 11 22H2 build 22621.3007 Rust ver: 1.75.0 bevy version: 0.12.1 CPU: Intel i5 8250U GPU: Intel UHD Graphics 620
I have the same issue. Any custom or standard material2d causes flickering. Sprites work.
Running Wayland on Arch. cargo 1.75.0 bevy 0.12.1
2024-02-02T20:35:43.139661Z ERROR log: XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
2024-02-02T20:35:43.179693Z INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 6800 XT (radeonsi, navi21, LLVM 16.0.6, DRM 3.56, 6.7.2-arch1-1)", vendor: 4098, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl }
2024-02-02T20:35:43.224529Z WARN bevy_pbr::ssao: ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
Example for Colormaterial:
I noticed, that the flickering only occures, when at least 2 meshes of the same kind are present on screen.
It feels like z-index fighting, but without sharing screen space.
I have no problems when exporting to wasm and running in the browser.
So far I can confirm, that this bug only happens on the GL Backend. Switching to vulkan makes this disappear.
WGPU_BACKEND=vulkan cargo run --features wayland --example 2d_shapes
I met the same issue as well, though in my case the overlapped three shapes are at the position of one of them, depending on which has the lowest z-value.
Bevy version
v0.12.1
Relevant system information
AdapterInfo { name: "AMD Radeon Graphics (rembrandt, LLVM 16.0.6, DRM 3.54, 6.6.3-zen1-1-zen)", vendor: 4098, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl }
bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 20230625.0.160437 Arch Linux", kernel: "6.6.3-zen1-1-zen", cpu: "AMD Ryzen 9 6900HX with Radeon Graphics", core_count: "8", memory: "23.2 GiB" }
What you did
cargo run --features wayland --example 2d_shapes
What went wrong
https://github.com/bevyengine/bevy/assets/878458/0959d365-77a8-4a56-92eb-1ee9afa869b2
Additional information
There is a warning in the log:
I can't test x11 because
cargo run --features x11 --example 2d_shapes
fails at runtime with: