Skip to content

Conversation

@mockersf
Copy link
Member

Objective

Solution

  • Sprite flipping is applied twice:
    if extracted_sprite.flip_x {
    uv_offset_scale.x += uv_offset_scale.z;
    uv_offset_scale.z *= -1.0;
    }
    if extracted_sprite.flip_y {
    uv_offset_scale.y += uv_offset_scale.w;
    uv_offset_scale.w *= -1.0;
    }

    if extracted_sprite.flip_x {
    uv_offset_scale.x += uv_offset_scale.z;
    uv_offset_scale.z *= -1.0;
    }
    if extracted_sprite.flip_y {
    uv_offset_scale.y += uv_offset_scale.w;
    uv_offset_scale.w *= -1.0;
    }
  • Keep one

@mockersf mockersf added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Mar 25, 2025
@mockersf mockersf added this to the 0.16 milestone Mar 25, 2025
@bushrat011899
Copy link
Contributor

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.

@kristoff3r kristoff3r added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 25, 2025
Copy link
Contributor

@ickshonpe ickshonpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😓

@ickshonpe
Copy link
Contributor

ickshonpe commented Mar 25, 2025

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.

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.

@mockersf
Copy link
Member Author

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.

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 👍

@mockersf mockersf added this pull request to the merge queue Mar 25, 2025
Merged via the queue into bevyengine:main with commit 70c6841 Mar 25, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants