Skip to content
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

[Merged by Bors] - bevy_render: Fix Quad flip #3741

Closed
wants to merge 1 commit into from

Conversation

superdump
Copy link
Contributor

Objective

The documentation was unclear but it seemed like it was intended to only flip the texture coordinates of the quad. However, it was also swapping the vertex positions, which resulted in inverted winding order so the front became a back face, and the normal was pointing into the face instead of out of it.

Solution

  • This change makes the only difference the UVs being horizontally flipped.

The documentation was unclear but it seemed like it was intended to _only_ flip
the texture coordinates of the quad. However, it was also swapping the vertex
positions, which resulted in inverted winding order so the front became a back
face, and the normal was pointing into the face instead of out of it.

This change makes the only difference the UVs being horizontally flipped.
@superdump superdump self-assigned this Jan 21, 2022
@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jan 21, 2022
@superdump superdump added A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior and removed S-Needs-Triage This issue needs to be labelled labels Jan 21, 2022
Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

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

LGTM. Love that the code is shorter too.

@james7132 james7132 added this to the Bevy 0.6.1 milestone Jan 21, 2022
Copy link
Contributor

@rparrett rparrett left a comment

Choose a reason for hiding this comment

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

Assuming your assumption is correct, this looks good and seems to work correctly.

@alice-i-cecile alice-i-cecile 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 Feb 10, 2022
@alice-i-cecile alice-i-cecile removed this from the Bevy 0.6.1 milestone Feb 10, 2022
@mockersf
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Feb 12, 2022
# Objective

The documentation was unclear but it seemed like it was intended to _only_ flip the texture coordinates of the quad. However, it was also swapping the vertex positions, which resulted in inverted winding order so the front became a back face, and the normal was pointing into the face instead of out of it.

## Solution

- This change makes the only difference the UVs being horizontally flipped.
@bors bors bot changed the title bevy_render: Fix Quad flip [Merged by Bors] - bevy_render: Fix Quad flip Feb 12, 2022
@bors bors bot closed this Feb 12, 2022
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
None yet
Development

Successfully merging this pull request may close these issues.

6 participants