Transformed UI node shows a one-pixel seam around an exact-fit child
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version and features
Bevy `main` at `0de26631b0603acdc945aeae5e05b07ce58bc4dc`, using default features.
## Relevant system information
Linux (Arch Linux), Vulkan.
```text
AdapterInfo { name: "AMD Radeon RX 7800 XT (RADV NAVI32)", vendor: 4098, device: 29822, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 26.2.1-arch1.1", backend: Vulkan }
```
## What you did
A solid child exactly fills its parent. Scaling the parent by `1.05` exposes a seam around the child.
Save this as `ui_seam.rs`:
```rust
---cargo
[package]
edition = "2024"
[dependencies]
bevy = { git = "https://github.com/bevyengine/bevy", rev = "0de26631b0603acdc945aeae5e05b07ce58bc4dc" }
---
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(Camera2d);
commands
.spawn(Node {
width: percent(100),
height: percent(100),
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
..default()
})
.with_child((
Node {
width: px(260),
height: px(340),
..default()
},
UiTransform::from_scale(Vec2::splat(1.05)),
BackgroundColor(Color::srgb_u8(155, 174, 193)),
children![(
Node {
width: percent(100),
height: percent(100),
..default()
},
BackgroundColor(Color::srgb_u8(20, 38, 58)),
)],
));
}
```
Run it with:
```sh
cargo +nightly -Zscript ui_seam.rs
```
## What went wrong
Expected: the dark child completely covers its parent.
Actual: the lighter parent color remains visible as a one-pixel seam around the child.
## Screenshot
Contributor guide
Research direction
Start by running the provided ui_seam.rs reproduction with cargo +nightly -Zscript and inspect Bevy's UI transform and rendering paths related to transformed nodes. Done means the exact-fit dark child fully covers the scaled parent without a visible one-pixel seam on the reported setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100