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

Transform improvements #233

Merged
merged 42 commits into from Oct 6, 2023
Merged

Conversation

maxammann
Copy link
Collaborator

@maxammann maxammann commented Dec 22, 2022

Implements perspective transforms like in maplibre-gl-js

This 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.

nyurik
nyurik previously approved these changes Apr 30, 2023
Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nyurik
Copy link
Member

nyurik commented Oct 4, 2023

soooooooo happy to see you hacking away on this :)

Copy link
Member

@nyurik nyurik left a 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

maplibre-winit/src/input/camera_handler.rs Show resolved Hide resolved
maplibre-winit/src/input/camera_handler.rs Show resolved Hide resolved
maplibre-winit/src/input/debug_handler.rs Outdated Show resolved Hide resolved
maplibre-winit/src/input/mod.rs Outdated Show resolved Hide resolved
maplibre-winit/src/input/mod.rs Show resolved Hide resolved
maplibre-winit/src/input/zoom_handler.rs Show resolved Hide resolved
maplibre/src/raster/request_system.rs Show resolved Hide resolved
@maxammann maxammann marked this pull request as ready for review October 5, 2023 17:41
@maxammann
Copy link
Collaborator Author

soooooooo happy to see you hacking away on this :)

Thanks! :) Yeah need to get this tidied up for EuroRust :D

@maxammann
Copy link
Collaborator Author

These apple executors are barely available :(

@maxammann maxammann enabled auto-merge (squash) October 6, 2023 10:42
@maxammann maxammann merged commit fa2c436 into maplibre:main Oct 6, 2023
20 checks passed
@maxammann maxammann deleted the transform-improvements branch October 6, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants