Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
c3e60c8
implement terrain in style
JesseCrocker Oct 15, 2025
8b376c5
Add RenderTerrain class for 3D terrain rendering with DEM support
JesseCrocker Oct 15, 2025
cf11a38
terrain shaders
JesseCrocker Oct 15, 2025
d1704c2
integrate terrain into rendering pipeline
JesseCrocker Oct 15, 2025
5689e6f
implement terrain
JesseCrocker Oct 15, 2025
d989c28
add terrain test style
JesseCrocker Oct 16, 2025
04bfc11
change url
JesseCrocker Oct 16, 2025
4afb549
integrate terrain update into render orchestrator
JesseCrocker Oct 16, 2025
1a5c687
implement DEM source lookup
JesseCrocker Oct 16, 2025
c6556e0
render terrain with color gradient
JesseCrocker Oct 16, 2025
6e687eb
render checkerboard test pattern
JesseCrocker Oct 16, 2025
fd89368
fix CMake compile
NathanMOlson Dec 29, 2025
6ccbd3a
Add OpenGL support for terrain, parity with iOS
NathanMOlson Dec 29, 2025
5d949e8
draw map data on terrain if it is valid
NathanMOlson Dec 29, 2025
792f477
use the passed texture for terrain, instead of the test elevation-bas…
NathanMOlson Dec 29, 2025
f7d05b9
approaching the right structure, but layers are currently not being r…
NathanMOlson Dec 30, 2025
02191ec
restore deleted generated file terrain.hpp
NathanMOlson Dec 30, 2025
7ecf235
Merge branch 'ios-terrain-claude' into render-to-texture
NathanMOlson Dec 30, 2025
f6e79bc
revert unhelpful changes. Moving layer rendering into render_terrain.…
NathanMOlson Dec 30, 2025
04b65a0
using map layers as texture to drape on terrain! but uses a single te…
NathanMOlson Dec 30, 2025
395930e
add default RTT pos matrix, which assumes that the map tile is the sa…
NathanMOlson Dec 31, 2025
731a345
pass (currently hardcoded) terrainRttPosMatrix with tileID
NathanMOlson Jan 2, 2026
ef2e902
Add a texture pool and assign a texture to each terrain tile (in prog…
NathanMOlson Jan 2, 2026
a606ec9
Setting up the texture pool. Each terrain tile now has its own textur…
NathanMOlson Jan 2, 2026
caaee4d
Add function to get render target for any ancestor/descendant of a te…
NathanMOlson Jan 3, 2026
db02799
pass the TexturePool around in PaintParameters. Calculate accurate te…
NathanMOlson Jan 5, 2026
50bde60
stricter tile descendancy check for RTT
NathanMOlson Jan 5, 2026
5ae8c41
draws tiles in the right place, but only the top layer is drawn (reas…
NathanMOlson Jan 5, 2026
de0dee0
Fix issue where only one layer was being rendered to texture
NathanMOlson Jan 5, 2026
1bb5320
remove debug code
NathanMOlson Jan 5, 2026
8d7900a
cleanup: revert changes that ended up not being needed
NathanMOlson Jan 5, 2026
3392b33
cleanup
NathanMOlson Jan 6, 2026
5059397
cleanup
NathanMOlson Jan 6, 2026
df9a4df
fix terrain rendering issue with non-integer zoom
NathanMOlson Jan 6, 2026
ad3d8a6
only add the layer tweaker once
NathanMOlson Jan 6, 2026
f8a43de
remove need for dynamic_cast so we can restore the no-rtti compile flag
NathanMOlson Jan 6, 2026
83dac50
Have each layer type specify whether it will render to terrain or not
NathanMOlson Jan 6, 2026
0de3eeb
fix terrainRttPosMatrix when vector tile is bigger than terrain tile
NathanMOlson Jan 6, 2026
714950a
Don't try to render to non-existent terrain tile
NathanMOlson Jan 6, 2026
57fae59
set the background color of RTT tiles. Ideally we would just apply th…
NathanMOlson Jan 6, 2026
ad099ed
make symbol layers play nice with terrain (not rendered to texture). …
NathanMOlson Jan 6, 2026
c55d30e
HACK to get line rendering to work on terrain
NathanMOlson Jan 6, 2026
c103108
Merge branch 'main' into render-to-texture
NathanMOlson Mar 26, 2026
1941943
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 26, 2026
d9a73f5
Merge branch 'main' into feature/terrain-3d
stefankarschti Apr 3, 2026
945a6f6
Fix compile error for 3D terrain layer (#4205)
stefankarschti Apr 4, 2026
56c71df
Delete .claude/settings.local.json
louwers Apr 4, 2026
1f88999
Merge main into 3d terrain branch (#4409)
acalcutt Jul 17, 2026
81d19a3
Continue 3d terrain work (#4389)
acalcutt Aug 18, 2026
f08e495
Merge main into feature/terrain-3d (up to #4485, before the namespace…
acalcutt Aug 19, 2026
916e5f8
Merge main into feature/terrain-3d (brings #4487, the `mbgl` -> `mln`…
acalcutt Aug 19, 2026
3ee5649
core: extend the `mln` namespace rename to this branch's own files
acalcutt Aug 19, 2026
0cbe079
shaders: sync symbol GLSL sources with their generated headers
acalcutt Aug 19, 2026
93807b1
core: remove duplicated FillExtrusionInstancedShaderSource definitions
acalcutt Aug 20, 2026
f51c4e0
core: remove two more duplications left by the main merge
acalcutt Aug 20, 2026
06bc1c9
vulkan: fix surface_transformed() after the GlobalPlatformParamsUBO c…
acalcutt Aug 21, 2026
0d56389
Merge main into feature/terrain-3d (brings #4511, the mbgl -> mln dir…
acalcutt Aug 24, 2026
b63800f
terrain: mesh the cover at the DEM source's declared tile size
acalcutt Aug 27, 2026
47aa23a
core: honour `tileSize` from a source's TileJSON
acalcutt Aug 27, 2026
d09df75
core: trim the tile-size comments to what is not already obvious
acalcutt Aug 27, 2026
ccde428
Merge main into feature/terrain-3d (brings #4383, symbol instancing)
acalcutt Aug 27, 2026
039c94b
webgpu: use the reconstructed matrix in the triangulated fill-outline…
acalcutt Aug 27, 2026
3c95c62
renderer: deactivate the previous terrain before replacing it
acalcutt Sep 2, 2026
69373c7
android: add runtime exaggeration controls to the terrain test options
acalcutt Sep 2, 2026
3115112
docs: fix the terrain style example and record the Metal device results
acalcutt Sep 2, 2026
a777fd4
Merge main into feature/terrain-3d (brings #4512, renderable size own…
acalcutt Sep 3, 2026
4dd1a20
core: read terrarium no-data as 0 rather than -32768
acalcutt Sep 6, 2026
3b6cb57
core: add a per-map terrain skirt length option
acalcutt Sep 6, 2026
fddb120
core: widen the DEM border to 2px so tile edges interpolate
acalcutt Sep 6, 2026
6b79e86
core: upload the color-relief DEM texture once per tile, not per frame
acalcutt Sep 6, 2026
296605f
Merge remote-tracking branch 'origin/main' into feature/terrain-3d
acalcutt Sep 6, 2026
3d343e8
core: address DEM texels exactly with texelFetch
acalcutt Sep 6, 2026
4dce09f
core: resolve out-of-tile elevation queries to the neighbouring tile
acalcutt Sep 6, 2026
c5bd7d4
core: keep the map centre on its altitude plane when the free camera …
acalcutt Sep 7, 2026
0dec148
core: let the map centre ride the terrain surface
acalcutt Sep 7, 2026
80c0994
docs: terrain/default is a drape failure, not the camera
acalcutt Sep 7, 2026
a0292cb
docs: correct terrain/default - the camera is inside the terrain afte…
acalcutt Sep 7, 2026
fcd249e
docs: option A works but must not land yet - the clamp does not match…
acalcutt Sep 7, 2026
2b3f895
docs: the terrain-anchored camera is correct - the divergence is down…
acalcutt Sep 7, 2026
ff88109
docs: record two confirmed tile-cover/LOD divergences from gl-js
acalcutt Sep 7, 2026
072d825
docs: record the globe PR convergence and the sharper LOD finding
acalcutt Sep 7, 2026
1883bd7
docs: record the coordination plan and what deltaZoom actually involves
acalcutt Sep 8, 2026
1f5e3ce
Update TERRAIN.md
acalcutt Sep 8, 2026
a4815e1
docs: depersonalise TERRAIN.md, and record the deltaZoom attempt and …
acalcutt Sep 8, 2026
0fb02b6
test: make terrain/occlusion-debug an oracle that exercises occlusion
acalcutt Sep 8, 2026
430ae67
test: grade every terrain render test against maplibre-gl-js
acalcutt Sep 8, 2026
76eebed
test: refetch the JAXA DEM fixtures from a single build
acalcutt Sep 8, 2026
a2006c2
test: run the skirts terrain tests against a single-encoding DEM
acalcutt Sep 8, 2026
560b6c2
docs: correct the skirts finding in TERRAIN.md
acalcutt Sep 8, 2026
0f38fef
refactor(core): share the GL JS tile zoom function beyond the globe c…
johncarmack1984 Sep 8, 2026
429c75e
Merge branch 'feature/tile-lod' into feature/terrain-3d
acalcutt Sep 8, 2026
1b8aae0
docs: bring TERRAIN.md up to date with the tile_lod position
acalcutt Sep 9, 2026
b0d42a5
Revert "test: run the skirts terrain tests against a single-encoding …
acalcutt Sep 9, 2026
773183c
test: drop the JAXA tiles added for the reverted skirts change
acalcutt Sep 9, 2026
7370a95
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 9, 2026
0938f20
docs: trim the JAXA fixture attribution to the attribution
acalcutt Sep 9, 2026
b0349e7
test: point the color-relief combination tests at the jaxa tile set
acalcutt Sep 9, 2026
eade39e
test: give the GEBCO bathymetry tiles their own folder
acalcutt Sep 9, 2026
371c11c
test: give the OSM basemap tiles their own folder
acalcutt Sep 9, 2026
f41f91e
test: reword the occlusion-debug description
acalcutt Sep 9, 2026
7414040
Revert "test: reword the occlusion-debug description"
acalcutt Sep 9, 2026
9a64676
test: grade the color-relief tests against maplibre-gl-js
acalcutt Sep 9, 2026
a31d17d
Merge main into feature/terrain-3d (brings #4601, Android 13.6.1 rele…
acalcutt Sep 9, 2026
7bc20bc
Merge origin/feature/terrain-3d (brings the pre-commit.ci trailing-ne…
acalcutt Sep 9, 2026
750d85d
core: add TileLodMode::Adaptive, the GL JS tile zoom function
acalcutt Sep 9, 2026
be9960c
core: cover with TileLodMode::Adaptive when terrain is present
acalcutt Sep 9, 2026
4e625bd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 9, 2026
345b020
test: cache the number tiles the terrain cover asks for
acalcutt Sep 9, 2026
c22246f
docs: record what the number debug tiles are
acalcutt Sep 9, 2026
912c3cc
core: measure the Adaptive cover's vertical distance to the terrain s…
acalcutt Sep 9, 2026
35e6e06
core: round the Adaptive per-tile zoom for raster sources
acalcutt Sep 9, 2026
420b0c8
core: let the terrain height settle the camera before a still render …
acalcutt Sep 9, 2026
27ee9e5
Merge origin/feature/terrain-3d (pre-commit.ci clang-format fixes)
acalcutt Sep 10, 2026
6bc36b3
Merge main into feature/terrain-3d (brings #4576, #4605)
acalcutt Sep 10, 2026
8943628
style: clang-format the files this branch touched
acalcutt Sep 10, 2026
c2122d0
Revert "core: cover with TileLodMode::Adaptive when terrain is present"
acalcutt Sep 10, 2026
65c1c50
Revert "core: let the terrain height settle the camera before a still…
acalcutt Sep 10, 2026
2ef164d
core: default the terrain centre clamp off
acalcutt Sep 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
- *...Add new stuff here...*
- [core] Draw numbers and short uppercase codes upright in vertical CJK line labels ([#4565](https://github.com/maplibre/maplibre-native/issues/4565)), compat to [maplibre-gl-js#8205](https://github.com/maplibre/maplibre-gl-js/pull/8205).
- [core] Fix `ImageSource` not rendering across world copies ([#4508](https://github.com/maplibre/maplibre-native/issues/4508)).
- [core] Honour `tileSize` from a raster/raster-dem source's TileJSON, as maplibre-gl-js does. It was parsed off the wire and discarded, so a style entry that omitted or mis-stated the size tiled at the wrong zoom.
- [core] Mesh 3D terrain at the tile size the DEM source selects tiles with, not the decoded DEM's pixel dimension. When the two disagreed the mesh covered a shallower zoom than the DEM loaded, every per-tile DEM lookup missed, and the terrain rendered flat off the placeholder DEM.
- [core] Repaint data-driven symbol paint properties after feature-state updates.
- [core] Accept alpha values in legacy comma-separated `hsl()` colors ([#4434](https://github.com/maplibre/maplibre-native/issues/4434)).
- [core] Fix thread-unsafe headless OpenGL display singleton initialization [#4332](https://github.com/maplibre/maplibre-native/pull/4332)
Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ list(APPEND SRC_FILES
${PROJECT_SOURCE_DIR}/src/mln/renderer/layer_group.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/tile_layer_group.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layer_tweaker.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/render_terrain.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/dem_elevation_provider.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/texture_pool.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/background_layer_tweaker.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/background_layer_tweaker.hpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/circle_layer_tweaker.cpp
Expand All @@ -208,6 +211,7 @@ list(APPEND SRC_FILES
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/raster_layer_tweaker.hpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/symbol_layer_tweaker.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/symbol_layer_tweaker.hpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/terrain_layer_tweaker.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/collision_layer_tweaker.cpp
${PROJECT_SOURCE_DIR}/src/mln/renderer/layers/collision_layer_tweaker.hpp
${PROJECT_SOURCE_DIR}/src/mln/shaders/shader_program_base.cpp
Expand Down Expand Up @@ -311,6 +315,7 @@ list(APPEND INCLUDE_FILES
${PROJECT_SOURCE_DIR}/include/mln/style/conversion/rotation.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/conversion/source.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/conversion/source_options.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/conversion/terrain.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/conversion/tileset.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/conversion/transition_options.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/expression/assertion.hpp
Expand Down Expand Up @@ -389,6 +394,8 @@ list(APPEND INCLUDE_FILES
${PROJECT_SOURCE_DIR}/include/mln/style/style_property.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/style.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/transition_options.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/terrain.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/terrain_observer.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/types.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/undefined.hpp
${PROJECT_SOURCE_DIR}/include/mln/style/variable_anchor_offset_collection.hpp
Expand Down Expand Up @@ -679,6 +686,8 @@ list(APPEND SRC_FILES
${PROJECT_SOURCE_DIR}/src/mln/storage/resource_transform.cpp
${PROJECT_SOURCE_DIR}/src/mln/storage/response.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/collection.hpp
${PROJECT_SOURCE_DIR}/src/mln/style/terrain.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/terrain_impl.hpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/color_ramp_property_value.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/constant.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/sprite.cpp
Expand All @@ -699,6 +708,7 @@ list(APPEND SRC_FILES
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/source.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/source_options.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/stringify.hpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/terrain.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/tileset.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/conversion/transition_options.cpp
${PROJECT_SOURCE_DIR}/src/mln/style/custom_tile_loader.cpp
Expand Down Expand Up @@ -985,6 +995,8 @@ list(APPEND SRC_FILES
${PROJECT_SOURCE_DIR}/src/mln/util/tile_cover.hpp
${PROJECT_SOURCE_DIR}/src/mln/util/tile_cover_impl.cpp
${PROJECT_SOURCE_DIR}/src/mln/util/tile_cover_impl.hpp
${PROJECT_SOURCE_DIR}/src/mln/util/tile_lod.cpp
${PROJECT_SOURCE_DIR}/src/mln/util/tile_lod.hpp
${PROJECT_SOURCE_DIR}/src/mln/util/tile_range.hpp
${PROJECT_SOURCE_DIR}/src/mln/util/default_style.cpp
${PROJECT_SOURCE_DIR}/src/mln/util/tile_server_options.cpp
Expand Down
Loading