-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
Improve terrain rendering when using globe projection #4825
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4825 +/- ##
==========================================
+ Coverage 90.51% 90.56% +0.05%
==========================================
Files 265 265
Lines 38095 38098 +3
Branches 3194 3188 -6
==========================================
+ Hits 34480 34503 +23
+ Misses 2636 2624 -12
+ Partials 979 971 -8 ☔ View full report in Codecov by Sentry. |
I've added a few minor comments. |
47ea4bb
to
20ce115
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a unit test maybe, or another render test that show the issue better.
Otherwise, this is approved.
cc96506
to
a983859
Compare
This was merged via #4977 |
This PR fixes #4792
When terrain is used we first render all layers on an offscreen framebuffer and then use it as a texture on the terrain.
When using globe in addition to terrain, the wrong matrix was being used so tiles were projected in the wrong place in the offscreen framebuffer. This fixes it on raster layers by using the mercator fallback matrix when rendering to the offscreen buffer. I'll tackle vector layers in another PR.
Note that there can be further improvements on terrain by using an orthographic projection when rendering to the offscreen buffer but I'll tackle that in another PR.
Launch Checklist
CHANGELOG.md
under the## main
section.