You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Animation isn't smooth. Things are jittering all over the place.
ui_scaling.mp4
Additional information
I'm not sure if this is a bug, or if the example needs to be reworked, or new expected behavior. This is just something I noticed in passing and wanted to document.
The text was updated successfully, but these errors were encountered:
I did some digging on that field
Explaining very shortly, there is a notable change in the Frame main position, probably caused by the GlobalTransform and Node::size() being mistaken somehow
So, I did some debugging in that example, marking the change in the Transform translation and node size (they are all calculated by window_scale * ui_scale, that being an important factor on the calculation)
Every frame here is 2 lines, and they only activate when the UiScale is changing !
The expected translation and size is here as follow (when the UiScale doesn't change)
Somehow, the UiScale is out of sync, and I'm not sure why
Other test that I did is Skipping one frame, and the problem is probably not some weird race condition
there is the possibility that the children are causing that jittering
Finally, I found out that the jittering exist even without children, removed the children of the node and the rect keeps moving
Pablo Lua
Is there a reason why we round the ui numbers?
nicoburns
The rounding is to ensure that thin lines (and text) in the UI can be drawn pixel-aligned and therefore sharp rather than fuzzy. The fixes to the rounding were to deal with a bug that was causing there to be gaps in the UI due to rounding issues. The rounding implementation atm is not ideal because while rounding occurs in physical coordinates, those values are subsequently converted to logical coordinates and back again after the rounding. For bug-free rounding, it ought to occur with physical coordinates at a stage beyond which logical coordinates are no longer used.
Bevy version
Since #9784
Relevant system information
Tested with
scale_factor
of1.0
and2.0
.What you did
cargo run --example ui_scaling
Press up arrow.
What went wrong
Animation isn't smooth. Things are jittering all over the place.
ui_scaling.mp4
Additional information
I'm not sure if this is a bug, or if the example needs to be reworked, or new expected behavior. This is just something I noticed in passing and wanted to document.
The text was updated successfully, but these errors were encountered: