Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rings radius to renderable body radius
When we have a satellite close to the planet then its rings and the planet itself is not visible (it has centerZ > 0) but the rings are visible Celestia incorrectly sorts render list for solar system object because it uses objects' farZ which is computed as centerZ - radius. So when the satellite is too close and the planet is "behind" such computation gives a result that the satellite is further then the planet (centerZ for the satellite < 0, but for the planet > 0) As a result depth partitions are incorrectly computed and we have a close object (the satellite) and a distant object (the planet) in the same depth partition. And this partition has huge farZ/nearZ (> 1e6). Such huge difference between the near and the far plans gives rendering artifacts. To fix this we should take into account rings radius when calculating render item radius.
- Loading branch information