Skip to content

Fix vertically flipped tiles offset in WebGL - #7419

Closed
hood wants to merge 1 commit into
phaserjs:masterfrom
hood:fix/tile-flipy
Closed

hood wants to merge 1 commit into
phaserjs:masterfrom
hood:fix/tile-flipy

Conversation

@hood

@hood hood commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR

  • Fixes a bug

Describe the changes below:

Closes #7417

Summary

TransformerTile#run added the vertical flip offset to x instead of y, so in WebGL every tile with flipY rendered one tile-height up and one tile-height to the right. One-character fix (x += frameHeight → y += frameHeight). The TransformerTile test asserted the wrong quad, so it now expects the correct one.

Verification

Symmetric tiles (filled square) look the same flipped or not. I rendered a 38x20 layer unflipped, then with every tile flipped, and diffed the two frames:

Flip master: differing pixels this PR
flipX 0 0
flipY 89,376 0
flipX + flipY 89,376 0

npx vitest run: only the 4 BaseTween updateStartCountdown tests fail, but tbh that’s also happening on master.

@photonstorm

Copy link
Copy Markdown
Collaborator

Thanks. #7403 contained the same fix for the flipY offset, so I merged that one into master for 4.3 and I'm closing this one. You're credited in the Change Log and your other PRs have been merged.

@photonstorm photonstorm closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[4.2.1] WebGL tiles with flipY render offset by one tile

2 participants