Markers in 3D rendered in wrong order with large pitch
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 1.12.0
**browser**: Chromium Version 84.0.4147.125 (Developer Build) (64-bit)
### Steps to Trigger Behavior
1. Add two markers close to each other.
2. Set pitch to 60°.
3. Rotate.
### Link to Demonstration
#### Animation
https://jsbin.com/tuyomax/edit?html,js,output
#### Screenshot

### Expected Behavior
The marker that’s closer to the camera should cover (be drawn over) the marker in the background.
### Actual Behavior
In the demo, the blue marker is always drawn in front of the red one — even if the blue marker is in the background w.r.t. rotation (camera position).
Contributor guide
Research direction
Start with the linked JSBin demonstration and reproduce the marker ordering at 60° pitch while rotating. Trace how the two markers are rendered relative to the camera, then verify that the marker closer to the camera is drawn over the background marker across rotations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100