Rendering artifacts on UI box
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
`main` [d628ae8]
## \[Optional\] Relevant system information
AMD RX 6700 XT
Ryzen 5 3600
Window manager: swaywm
Arch Linux
cargo 1.70.0-nightly
AdapterInfo:
```ignore
2023-05-29T01:59:20.457326Z INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 6700 XT", vendor: 4098, device: 29663, device_type: DiscreteGpu, driver: "AMD open-source driver", driver_info: "2023.Q2.2 (LLPC)", backend: Vulkan }
2023-05-29T01:59:20.463612Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling Arch Linux", kernel: "6.3.4-arch1-1", cpu: "AMD Ryzen 5 3600 6-Core Processor", core_count: "6", memory: "31.3 GiB" }
```
## What you did
Add a UI box, and set the background color.
```rust
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(Camera3dBundle::default());
commands.spawn(NodeBundle {
style: Style {
width: Val::Px(300.0),
height: Val::Px(300.0),
align_self: AlignSelf::Center,
justify_content: JustifyContent::Center,
..default()
},
background_color: Color::rgb(0.85, 0.85, 0.85).into(),
..default()
});
}
```
## What went wrong
There are rectangular artifacts flickering within and around the drawn box.


## Additional information
Seems to occur more often when the app window is a floating window, being resized, or at certain window dimensions
Tested
- [`wgpu`](https://github.com/gfx-rs/wgpu) for rendering artifacts, there were none
Contributor guide
Research direction
Start with the minimal Rust example in the issue, especially the NodeBundle setup, and reproduce it while resizing the window or using a floating window at different dimensions. Compare the UI box artifacts with the reported wgpu result; done means identifying and fixing the flickering rectangles without introducing a regression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100