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

Gaps in terrain with fog and small horizon-blend #10677

Closed
rreusser opened this issue May 12, 2021 · 1 comment
Closed

Gaps in terrain with fog and small horizon-blend #10677

rreusser opened this issue May 12, 2021 · 1 comment

Comments

@rreusser
Copy link
Contributor

rreusser commented May 12, 2021

mapbox-gl-js version: 2.3.0-beta.1

browser: Chrome

Steps to Trigger Behavior

  1. View a location at elevation such that the terrain is slightly above the horizon : http://localhost:9966/debug/fog.html#10.27/29.5925/81.5995/-38/83
  2. Set fog range to [-1.3, 4]
  3. Set horizon-blend to 0
  4. Small gaps may appear in terrain as you pan

Link to Demonstration

Codepen: https://codepen.io/rsreusser/pen/QWpymwo?editors=1010
Debug page: http://localhost:9966/debug/fog.html#10.27/29.5925/81.5995/-38/83

Screen Shot 2021-05-12 at 1 02 38 PM

Expected Behavior

Gaps in tile coverage are not visible

Actual Behavior

Gaps in tile coverage are visible

Possibile remedies

  • Disable tile culling when horizon-blend is below ~0.04 or so. That represents a probably-undesireably-harsh transition from fog to sky, so this would probably be an acceptable threshold at which to stop culling to avoid these artifacts.
  • Disable tile culling if no sky layer is present. Even with a threshold, the above fix won't address the case where there's simply no sky present to catch the fog color. Gaps will be unavoidable unless there's something there to catch the color.
@rreusser rreusser added this to the v2.3 milestone May 12, 2021
@rreusser rreusser self-assigned this May 12, 2021
@rreusser
Copy link
Contributor Author

Edit: I forgot that we render fully opaque fog on a blank background, so the no-sky case is not a problem. Then I think the best solution is to disable culling at some minimum reasonable threshold.

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

2 participants