don't flip sprites twice (#18535)

# Objective

- After #17041, sprite flipping doesn't work

## Solution

- Sprite flipping is applied twice:

b6ccc2a2a0/crates/bevy_sprite/src/render/mod.rs (L766-L773)

b6ccc2a2a0/crates/bevy_sprite/src/render/mod.rs (L792-L799)
- Keep one
This commit is contained in:
François Mockers 2025-03-25 19:20:13 +01:00 committed by GitHub
parent b6ccc2a2a0
commit 70c68417f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -789,15 +789,6 @@ pub fn prepare_sprite_image_bind_groups(
); );
} }
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;
}
let transform = extracted_sprite.transform.affine() let transform = extracted_sprite.transform.affine()
* Affine3A::from_scale_rotation_translation( * Affine3A::from_scale_rotation_translation(
quad_size.extend(1.0), quad_size.extend(1.0),