apply the inverse scale factor using the transform in UI text extraction#9457
Conversation
|
Example |
|
Is this effectively reverting #8197? It seems like it reintroduces the bug that was fixing. |
|
Oh you are right, this doesn't work the text is still distorted when clipped. I must have been on the wrong branch or something when I tested it earlier, I was thinking that the other changes since #8197 must have fixed the clipping.
|
|
Avoids any problems now by only applying the scaling to the transform when text is unclipped. |
|
Example |
|
An alternative is that we could scale the texture rects and atlas size stored in the texture atlas. It would simplify extraction but seems like a hack though. |
|
Example |
Can you run a new set of benchmarks quick? It sounds like we've introduced a branch since that last one. |
5f258f8 to
fdc7cb3
Compare
Objective
bevy_ui::extract_text_uinodesmultiplies the position and atlas coordinates of each glyph by the inverse scale factor. It would be more efficient to apply the scaling directly to the text node's transform.Solution
Scale the transform by the inverse scale factor instead.
Changelog
bevy_ui::extract_text_uinodes:The text node's transform is scaled by the inverse scale factor, instead of multiplying the positions and atlas coordinates of each individual glyph.