3D terrain w/ raster-dem source + terrain exaggeration causes clipping at high zoom levels
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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