-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pixel gap between adjacent UI grid cells #9754
Comments
I can reproduce by using the same scale factor. Seems like probably some rounding bug here or in Taffy. For the convenience of anyone else taking a look: .add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
resolution: WindowResolution::default().with_scale_factor_override(7. / 6.),
..default()
}),
..default()
})) |
Yep, replicates on main. The example needs to be recreated in Taffy, yrns want to carry on with this? |
I can try, sure. |
FWIW, I could not reproduce in Taffy either. This is what I get in Bevy (11.2, taffy 0.3.10) for comparison:
|
This makes sense to me. I made the change and it seems to work, branch here: https://github.com/ickshonpe/bevy/tree/round-after-scaling So, from what I can understand, for rounding to work correctly all the time either:
|
# Objective Fixes #9754 ## Solution Don't round UI coordinates until they've been multiplied by the inverse scale factor.
# Objective Fixes bevyengine#9754 ## Solution Don't round UI coordinates until they've been multiplied by the inverse scale factor.
Bevy version
11.2
Relevant system information
What you did
What went wrong
The vertical pink line seems to be related to the margin, as it doesn't appear with a zero margin. But varying values of width and height for the cells also make the gap disappear. Maybe related to #7712, although not a regression (I tested the sample on 11.2 and it works).
The text was updated successfully, but these errors were encountered: