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
Transform improvements #233
Conversation
4903814
to
c591172
Compare
c591172
to
49eb659
Compare
49eb659
to
a99dab1
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.
lgtm
# Conflicts: # maplibre/src/view_state.rs
# Conflicts: # maplibre/src/raster/upload_system.rs # maplibre/src/render/systems/tile_view_pattern_system.rs
soooooooo happy to see you hacking away on this :) |
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.
a few minor suggestions
Thanks! :) Yeah need to get this tidied up for EuroRust :D |
These apple executors are barely available :( |
Implements perspective transforms like in maplibre-gl-jsThis fundamentally reworks how the far distance plane is calculated. First I wanted to implement it like in maplibre-gl-js. Though that appraoch did not allow yaw AND pitch in both directions. It only allowed pitch in a single direction (only 90°, not the full 180°).
The new approach is dicussed here: https://gamedev.stackexchange.com/questions/207328/calculation-of-far-distance-plane-based-on-yaw-and-pitch-for-a-map-renderer
It works in all directions and should also be way faster to calculate.
This PR also fixes the amount of tiles that are whown for the current zoom. If calculates the appropriate zoom level based on the current zoom and takes into account the resolution of tiles.