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

Flipped tiles wobble when "Snap 2D Vertices to Pixel" is true in 4.3 #96256

Closed
svendixon opened this issue Aug 29, 2024 · 3 comments
Closed

Flipped tiles wobble when "Snap 2D Vertices to Pixel" is true in 4.3 #96256

svendixon opened this issue Aug 29, 2024 · 3 comments
Milestone

Comments

@svendixon
Copy link

Tested versions

  • Reproduceable in: 4.3
  • Not Reproduceable in: 4.2.2

System information

Windows 11 - Godot v4.3.stable - Vulkan (Forward+) - dedicated

Issue description

Flipped tiles wobble when in a pixel perfect setup in 4.3. The issue does not appear to happen in 4.2.2.

flipped_tiles_wobble

In the video below the diagonals are flipped both vertically and horizontally. And you can see a gaps as well as double pixels appearing. The original diagonal which is not flipped looks fine.

2024-08-28.22-45-21.mp4

In 4.2 it doesn't happen.

2024-08-28.22-46-02.mp4

However if you leave Snap 2D Transforms to Pixel on and turn off Snap 2D Vertices to Pixel, it seems the problem is resolved. So it's not a big deal. But I figured I'd post this, since flipped tiles are not behaving the same as the original tiles with this setting on.

Steps to reproduce

Create a project with a tile map layer and assign a tile set with a tile and flip it. (example projects below)

Projects settings:

Display:

  • Window Size = 640x360
  • Window Width Override = 1280x720
  • Stretch Mode = viewport
  • Scale Mode = integer

Rendering:

  • Default Texture Filter = Nearest
  • Snap 2D Transforms to Pixel = True
  • Snap 2D Vertices to Pixel = True

Minimal reproduction project (MRP)

4.3 Project - flipped_tiles_wobble_4_3.zip
4.2.2 Project - flipped_tiles_wobble_4_2.zip

@akien-mga
Copy link
Member

CC @adamscott @markdibarry

@markdibarry
Copy link
Contributor

I believe this is a duplicate of #95571, but feel free to correct me. I'm not totally familiar with Snap 2D Vertices to Pixel, but the docs recommend against using Snap 2D Vertices to Pixel at all and to only use Snap 2D Transforms to Pixel, so I'm not sure if anything else needs done?

@markdibarry
Copy link
Contributor

markdibarry commented Sep 21, 2024

This is fixed by just using snap_2d_transforms_to_pixel, but #97260 also fixed snap_2d_vertices_to_pixel as well. Tested the MRP and can't reproduce in either case now.

@AThousandShips AThousandShips added this to the 4.4 milestone Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@akien-mga @svendixon @markdibarry @AThousandShips and others