-
-
Notifications
You must be signed in to change notification settings - Fork 806
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
Disable fog (opacity = 0) on globe with terrain elevation #4963
Disable fog (opacity = 0) on globe with terrain elevation #4963
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4963 +/- ##
==========================================
- Coverage 90.67% 90.45% -0.23%
==========================================
Files 266 266
Lines 38163 38164 +1
Branches 3164 3254 +90
==========================================
- Hits 34606 34521 -85
- Misses 2611 2650 +39
- Partials 946 993 +47 ☔ View full report in Codecov by Sentry. |
Can you add a unit test to cover this issue somehow? |
@HarelM , I've added a unit tests, and a render test that can be used to help validate a fix to the fog |
test/integration/render/tests/terrain/fog-sky-blend-globe/bug-when-fog-is-enabled.png
Outdated
Show resolved
Hide resolved
Overall approved, let me know if the file I commented on is needed. |
Please add a changelog entry. |
Closes #4928
Towards
As mentioned here, the globe doesn't support Fog "calculateFogMatrix is not supported on globe projection":
maplibre-gl-js/src/geo/projection/globe_transform.ts
Line 682 in ef6e9ee
Unfortunately, it's still trying to render it, which consistently breaks the map whenever the map is pitched just a bit.
This tiny PR simply set the opacity of the fog/horizon to 0 in globe+terrain mode. When the globe does support fog with terrain, this can easily be removed again:
Fog is still active on Terrain3D without Globe
With Globe - zoom level before mercator transition
Before

After - main branch

After - local branch

With Globe - high zoom, after transition to mercator
Before

After

Without Globe - Fog Still Works
Before/After

Launch Checklist