Precision Issues With Small Primitives
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
This issue stems from the following community forum thread: https://community.cesium.com/t/bug-bad-precision-on-0-01-meter-sphere/15050
CesiumJS struggles to render very small primitives. While this behavior can be seen on laptops and desktops, it appears to be more prominent on iOS mobile devices. On an iOS device, we begin to see issues when viewing spheres that have a radius of one meter. I have not tested to see if this issue occurs on android smartphones or tablets of any kind.

Here is a video demo that I put together.
https://youtu.be/UZBvFOZwQ-4
This issue could potentially be related to highp or lowp settings in the glsl shaders. GPU precision could also play a role here. I understand that sandcastle was created as a development tool. Regardless, the sandcastle experience on mobile devices is not great.
Sandcastle example: https://sandcastle.cesium.com/#c=bZBNb8IwDIb/itVTkbqUauzSFTTBuCHtsI9TLqE1LFoSV0laBBP/fWk7BmIokhXb7/NadisstBJ3aGEKBnewQCcbzT76Wsyjss8XZLyQBi2PRo/ccNMGbq0aXCola0eyCvjgw9B46SU6Jqoq/uYGwAiNOfBoHgDAE8GjpGvW5IKcTH4avRDWh58w92xjST/j1iK6+C7LJmycwGTcxYcQRz3/55dDPwzAikrK/HKbs2WcJeENJIAWHq0U6jybFFk2X70ve8UxxOPvwsNyByL9RvHVqoMkSqLC+b3C2eAO8CR1TdZDY1XMWOpR1yqMdOm6Kb/Qs9L1aCct0ku0qGQLspreuD+USjgXOptGqVd5QB7NijTo/6GKwiHM9qVFq8S+k31ms9VQZIwVaUhvk55IrYW9cv4B
Browser: Chrome, Safari
Operating System: iOS, Windows, Linux
@ebogo1
Contributor guide
Research direction
Start with the linked Sandcastle example and reproduce the small-sphere rendering problem on iOS Safari or Chrome, then compare it with Windows and Linux behavior. Investigate the reported rendering and shader precision possibilities; done means small primitives render reliably across the listed environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100