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

Artifacts in example Shaded Relief (with WebGL) #15477

Open
Dolpic opened this issue Jan 10, 2024 · 1 comment
Open

Artifacts in example Shaded Relief (with WebGL) #15477

Dolpic opened this issue Jan 10, 2024 · 1 comment
Labels

Comments

@Dolpic
Copy link

Dolpic commented Jan 10, 2024

Describe the bug
In the example named "Shaded Relief (with WebGL)", when zooming on the map, lines of different color are generated at the intersection of tile.

WebGl Shaded Relief with artefacts

To Reproduce
Load the example at https://openlayers.org/en/latest/examples/webgl-shaded-relief.html.
This can be seen on any data loaded with WebGL tiles where the style makes a computation requiring neighbors pixels.

Expected behavior
The tiles should appear without artifacts between them.

This bug is the cause of two issues:

  1. The first is that, on a tile's borders, the slope is computed with pixels outside the tiles, which by the WebGL texture are the border pixel repeated, leading to an incorrect slope.
  2. Interpolation is activated for the map, and the border of the tile are interpolated by WebGL which create further artifacts.

The PR #15478 fixes this issue.

@mike-000
Copy link
Contributor

mike-000 commented Jan 10, 2024

This can be fixed by using buffered tiles (as done by Mapbox). Tiles with a gutter/buffer added are available from Nextzen and Mapbox, or could be produced by combining unbuffered tiles in a custom loader, see #14964 and #13647.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants