scene.sampleHeight cause polygon(clamp to ground) to flicker at top view
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
### What happened?
I want to draw a midpoint between two points, and I expect the point height fit the ground/3dtiles. I first calculate the world position of that point, convert it to cartographic coordinate, then call scene.sampleHeight. When at a top view, the polygon will flicker.It seems that sampleHeight destroy the main render.
https://github.com/CesiumGS/cesium/assets/12868409/56826d83-ff50-4cf2-8878-61f8dd12179e
### Reproduction steps
1.Create a polygon and clamp it to ground;
2.Change the camera to a top view;
3.Call scene.sampleHeight;
4.The polygon flicker.
### Sandcastle example
https://sandcastle.cesium.com/#c=fVNba9swGP0rIk8OeIou1i1Nw0opW2F0kJW9LHtQHTURUywjKSlp6X+fEse9U7DB0vnOOd/NAABQ+yYmsLXmzgRwChpzB85NtJs1/H24K+aD+nA+903StjFhPhiezJtMBc4k0KLXrHMdUv7SDS2+YI4QriiUvFJKiYryEjBKMJUMSqoEEhhVJaCYoEoiyCjnHDMq6SsD/IkBU0IRDnEW46KqSHUwoIIiKCXChFVS7Q2w4LSCqkKKkwpj9sqAfFoBwVJCxITKUkwd9AllCkoic7aUyU5fSAEZYphyIshLeR32ff3TojKXkl/yd950aNd0aJpkkzUR6sWieOggABq9NmMwH8zMArTe7Za+AfmJm3CrazMflH3gERyDJyoAK2uCDvVqN97bl8/AWicTrHbjp2K98wF+m11cXME7m1Znrl3pIs9i+IJVOx2jvbW1TtY317vWPPPfQfD6YjY7u7zq6Y9Hoce+Kcey771fX/viTRP2QV1YNOmyydlutSuKITidPhe4b2udp+TfD84vg25Xti5w3jrCuZBMMkUQF6wEuSycV0ApRikSAhFSAsIZpJxhzEkOQ6rq0+xsgokbl7LPMc9Ym8bAqNetM9+NXa5SccikZz2WACOEhieDcjCJaefMtJf7atetDwlsgisgHCWTNfI44uhmU/8zCdYx9iqT0UvqZGG3wC5OP/gTu9Fk5Hbj3C97nxdjOhnl+HdU5/XCNsufWxOc3u3DVnj6o7uEEE5G+fgxM3nvbnR4o/wf
### Environment
Browser:Chrome
CesiumJS Version:1.118
Operating System:Windows 10 x64
Contributor guide
Research direction
Start with the linked Sandcastle example and reproduce the issue using scene.sampleHeight, a polygon clamped to ground, and a top-view camera. Trace how sampleHeight interacts with the main render, then verify that the polygon remains stable and does not flicker after the call.
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