Race condition in billboard clamping
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
I found this while testing out native promises, but confirmed it happens in master as well.
1. Open Billboard Sandcastle: https://sandcastle.cesium.com/?src=Billboards.html
2. Select "Add marker billboards" It will look like this: 
3. Focus should be on the combo box, so press arrow down to switch to "Disable depth test when clamped to ground.
4. As soon as the billboard is visualized and while the terrain is still going, press arrow up to go back to "Add marker billboards" it will now look like this:

The billboard will remain in the wrong location for other examples as well. Something thinks this billboard is supposed to be clamped to ground when it's not.
P.S. You can use the mouse to switch between the demos as well, but the arrow key makes it easy
Contributor guide
Research direction
Reproduce the problem in the Billboard Sandcastle example at https://sandcastle.cesium.com/?src=Billboards.html by switching between “Add marker billboards” and “Disable depth test when clamped to ground” while terrain is loading. Start by tracing the billboard clamping state during that transition. Done means the billboard remains at the correct location after switching back, including while terrain is still loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100