Not enough depth precision to render solar view?
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
This [Sandcastle renders the sun](https://sandcastle.cesium.com/index.html#c=jVZdU9s6EP0rmrw06WTsfBR6gZS5XGh5SYGBTh9a86BY61i3suSR5GRCJ//9rvyRWMQ01xAc6Zw9q92VVqyoJpoyXhjyiZyenU4/TEaj0UUkI7lCiArLbcEAwZr1nkwvKmzFYQ0aEQlrcg2GF1nwvZzrv4vL4bWSlnIJ+t2Q/I4kwcekqhDsSvKMWiDnJKHCwLDGfm2ubKZMnoIGH8po/qDVvxBbruR52+MtqKWmecrjPaHfwj8LwXOjOOtXAQy912AQye1gF25MM9AUQ6piC0wMEoJqFklhWH0NEl0Yi+ISqEvAeNQ8XaSk5JyN2qTa3UsmEPpZ5ybqcRb1MClRj6m4yEDaqDdsMImqNXr94+ucYOAZWM3BnJMHJTYCE92ir0AbTEVtMQ5GUQ9D3dWh5etBUAkWM0Tu9YJbMveFWn4fgRHnhsSCZjkOrCIWQ+Wyxc93a0Gb2luDGO7KY15DFRxTbZta3sBSA1TEnz7RPaOh+2025/CQ8OHkGOPsqMZ4elRk/NdRlcnkqMrk41GV6fioyvTUV/EZz/vhdtguijuHmlPRXROjBGfXSijdhdd1+xNcUfRyQataTk4wEO/P86HR1p/avrX2NWc2LXVP6nmkbp/L8xXJJypZTI0VEGgwYPGkJYWsGsTArbUycQcRmibhd7OD3kH8t2scjcRSqAX45rduqr/TrtqM45fcACRdCJjzZWq5XLrVuYZ30aZgt1zfalVItm+MLeLeO3rtaoSv1tPVKjuW5zW/Jq7yffEWIVhQA+U+QWrtrhwG949Xd7efu7UTtayzwF6F79EypWSZij+RTPE/OCllav2V5t1eK4sw/LZWZE03hrjuyghunbJArtmHSXlfYuZc73tRKiOqsO47nhSEzMZYyIjhL9Co3SmdUXEDuU3JP0WSgG4QPxdUf1N36OKxVMdLBU5G/rrmakk1t2nGY8JKvUVLz1MTe2rpuXKMqlYXnal5bfDljeVUP822Y9TSJ1XoGHBHZdxAq/p4t93sYNSnrO/uu4Hvfa9gAspY/0DR8bf46Q17M2M3Ai4r+795littSaFFPwhCzHousJWZcFHEv8AGsSmP5yxsjGaMrwhnn7Bh+f+cYAPB+8wYRJJCiCdXu97lLES+Z+ZCwH1wjzeroBtHSceX82oyCIJZiMNDK6uUWFDdUvwP). One issue at this scale is that depth testing starts to fail. The line should be behind the globe here and not show through:

If you reduce the radius you can see it depth testing correctly. Another issue here is zooming out a bit makes the globe and entities disappear. But you can work around that by shifting the near and far planes:
```
camera.frustum.near = 1000000000;
camera.frustum.far = 90000000000;
```
But that seems to be not enough to fix the line behind the globe.
Came up [in this forum thread](https://groups.google.com/forum/#!topic/cesium-dev/pDezVst5b_I), same as this issue https://github.com/CesiumGS/cesium/issues/8683.
Contributor guide
Research direction
Start with the linked Sandcastle reproduction and inspect how the camera frustum near and far planes affect depth testing at the shown scale. Compare the default frustum with the provided near and far values, then verify that the line stays behind the globe and that the globe and entities remain visible when zooming out.
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