-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
don't flip sprites twice #18535
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
don't flip sprites twice #18535
Conversation
|
Out of curiosity, the linked PR didn't flag as causing a rendering change. Do we know why? Might be good to diagnose so we can rely on that (really helpful!) test more. |
ickshonpe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😓
Testbed_2d just doesn't have any sprite flipping. Just needs the sprite from its sprite example module copied another three times flipped in each axis and both. |
I put in the testbed a few cases that I had in mind, but they're definitely not covering everything. We have to balance duration and coverage. We get a better coverage by running all the examples (https://thebevyflock.github.io/bevy-example-runner/index.html) but that's not on every PR ci as it takes 1.5 hour. That said, adding sprite flipping shouldn't add any duration, so it's a good idea to do 👍 |
# Objective - After #17041, sprite flipping doesn't work ## Solution - Sprite flipping is applied twice: https://github.com/bevyengine/bevy/blob/b6ccc2a2a0fac4d1a8d717920166b32f39b40cd9/crates/bevy_sprite/src/render/mod.rs#L766-L773 https://github.com/bevyengine/bevy/blob/b6ccc2a2a0fac4d1a8d717920166b32f39b40cd9/crates/bevy_sprite/src/render/mod.rs#L792-L799 - Keep one
Objective
ExtractedSpritesslice buffer #17041, sprite flipping doesn't workSolution
bevy/crates/bevy_sprite/src/render/mod.rs
Lines 766 to 773 in b6ccc2a
bevy/crates/bevy_sprite/src/render/mod.rs
Lines 792 to 799 in b6ccc2a