-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
3D Extrusion of Buildings #192
base: main
Are you sure you want to change the base?
Conversation
Converted to draft, or it this ready for review? :) |
I think it's not quite ready for production but being an experimental functionality, we could just disable it by default and enable it when we want to. I guess the main thing left to do is to cleanup the big function with the extrusion to simplify the code and review/discuss about the implementation details. |
Yes please, 3D buildings! The changes are not that much: |
I'll resolve merge conflicts now! |
# Conflicts: # maplibre/src/headless.rs # maplibre/src/render/stages/upload_stage.rs # maplibre/src/stages/request_stage.rs
@@ -99,13 +99,13 @@ impl Shader for TileShader { | |||
// position | |||
wgpu::VertexAttribute { | |||
offset: 0, | |||
format: wgpu::VertexFormat::Float32x2, | |||
format: wgpu::VertexFormat::Float32x3, |
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.
I'm not sure if we should upgrade from 2D to 3D for everything.
This will increase the required bandwidth to the GPU.
But I'm not sure how much the impact is performance wise.
@Drabble Hi! Are you still interested in pushing this forward? :) I guess a lot changed, but I think it would be nice to keep this effort updated. |
This is a simple implementation for showcasing 3d possibilities in Maplibre-rs.
We simply take the elements in the buildings layer and extrude them with a fixed height.
In the future, it would be very interesting to add details to the buildings that are extruded and extrude based on the height metadata available in OSM.
Extrusion can be enabled/disabled in the
Style
configuration.Finally I probably should split the function in
tile_pipelines.rs
into smaller functions to make it easier to understand.