mapbox / mapbox/mapbox-gl-js

3D terrain w/ raster-dem source + terrain exaggeration causes clipping at high zoom levels

Open
#13,675 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### mapbox-gl-js version

3.22.0

### Browser and version

Chrome 148.0.7778.216

### Expected behavior

At high zoom levels with a raster-dem source & terrain exaggeration, higher elevations are not clipped

### Actual behavior

At high zoom levels with a raster-dem source & terrain exaggeration, higher elevations are clipped. The white background is rendered underneath instead.

### Link to the demonstration

_No response_

### Steps to trigger the unexpected behavior

- Open a map with a raster-dem source & terrain exaggeration (the [mapbox example](https://docs.mapbox.com/mapbox-gl-js/example/add-terrain/) works)
- Navigate to a place with very high elevation deltas. The grand canyon works well for this repro

https://github.com/user-attachments/assets/87738ecb-54a1-4b60-b5b4-5f2b21514061

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the linked Mapbox add-terrain example in Chrome 148, using a raster-dem source and terrain exaggeration. Navigate to the Grand Canyon at high zoom and verify the white-background clipping; done means higher elevations render without clipping.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.