-
Notifications
You must be signed in to change notification settings - Fork 96
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
Background is not properly tiled and blurry #1650
Comments
Thanks for reporting @Nekzuris - we can look into it. iD and Leaflet create a slippy map of Rapid actually packs the image data into an atlas texture and uploads these images to the GPU. We can render the tiles at exactly the correct size, however we offset the texture coordinates by half a pixel so that the texture doesn't bleed into neighboring images in the atlas - this is probably what is causing the blurriness. It will always be a very tiny bit blurry, but there should never be seams from neighboring textures or empty parts of the atlas. |
The goal here is to eliminate the half-pixel correction that we used before to close the seams between imagery tile textures packed into the atlas. see 4e8f16b While it does prevent the colors from bleeding into the neighboring texture, it distorts the image a little bit - this is especially visible when zoomed in. Instead, we'll do this: - Just add 1px of padding to everything packed into the atlases - For imagery tiles, duplicate the edge data into this 1px padding, so when the tiles are sampled, they blend with the padding, not the neighboring texture. I tried it and it works ok - but my method of filling the padding is inefficient. I'm just calling `texSubImage2D` a bunch of times with the full image. Will followup this commit with something more efficient that only writes the pixels we need.
Description
I noticed that the tiles are very blurry and not properly tiled, not a big deal with real imagery, but quite noticeable with text like Mapnik Carto.
With canary the blur is almost gone but still not properly tiled.
I haven’t yet looked at the renderer code, but you probably just need to remove a small scale factor applied on every tiles.
This scale factor is typically used to hide gaps between tiles on Chrome due to this bug but might no longer be necessary and is definitely not needed on Firefox.
For reference I've done this for iD openstreetmap/iD#10594
Screenshots
Blurry and visible tiles on rapid
Sharp and properly tiled with leaflet
https://www.openstreetmap.org/#map=18/48.272140/7.052858
Version
2.4.3
What browser are you seeing the problem on? What version are you running?
Firefox v133.0
The OS you're using
win
Steps to reproduce
Open the editor and look closely (hide data layer).
The browser URL at the time you encountered the bug
https://rapideditor.org/edit#map=18.00/48.27224/7.05398&background=MAPNIK&datasets=fbRoads,msBuildings&disable_features=boundaries
The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
The text was updated successfully, but these errors were encountered: