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

At low zooms, tiles with transparency can disappear #3657

Open
eishiya opened this issue Apr 14, 2023 · 0 comments
Open

At low zooms, tiles with transparency can disappear #3657

eishiya opened this issue Apr 14, 2023 · 0 comments
Labels
bug Broken behavior.

Comments

@eishiya
Copy link
Contributor

eishiya commented Apr 14, 2023

It seems that as of Tiled 1.10, Tiled employs a different image sampling method when the view is zoomed out. While mostly fine, it seems to be a variant of Nearest Neighbour that can cause tiles with transparent pixels to entirely disappear at low zooms.

For example, here is a map filled with one tile on the left and another on the right. The left tile is fully opaque, mostly green, but with a teal shadow. The right tile is mostly beige, but with some transparent pixels on the right side. The tiles are 16x16.

Zoomed in view showing details of the tiles, so you can see the teal and transparent pixels.
image

6% zoom. The left tiles all blend into a solid green mass, that happens to match the dominant green colour of the tiles. The right tiles merge into a dark beige mass, a colour not from the tiles. This is all fine.
image

3% zoom. The left tiles all the teal from the shadow/border, while the right tiles are all transparent. In both cases, it looks like the bottom right pixel from the tiles is sampled, instead of blending colours from more of the tile. Not only does half the map appear gone, the tiles that are visible don't look as one might expect.
image

I think this is new in Tiled 1.10, I think 1.9.x and earlier used a different image sampling method that produced blurrier but more representative results. I wonder if this resampling method is tied to #3656 (lag when drawing large maps zoomed out), either as a cause, or as Qt's attempt to mitigate potentially worse lag by sampling fewer pixels.

I am using Tiled 1.10.1 64-bit on Windows 10. Hardware rendering is off.

@eishiya eishiya added the bug Broken behavior. label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

1 participant