CesiumGS / CesiumGS/cesium-native

Improve accuracy/performance of camera-inside-tile test for non-region tiles

Open
#383 0 comments 0 reactions 1 assignee Claimed by @timoore View on GitHub
enhancement performance
Dominant language
C++
Stars
623
Forks
277
PR merge metrics
No merged PRs in 30d

Description

When the `renderTilesUnderCamera` tileset option is set, we consider tiles that are "under" the camera visible even if they're actually outside the view frustum (e.g. because the camera is looking up). This is useful to reduce that chances of the player falling through the terrain because it disappears out from under them, for example.

For tiles with a bounding volume that is _not_ a region, though, this check is a little dodgy after #327. It estimates the bounding region by projecting the coordinates of the corners of the actual bounding volume, and then checks if the camera is in that region. A more accurate and performant approach would be to cast a ray down from the camera and see if it intersects the bounding volume.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.