Skip to content

Conversation

@ggetz
Copy link
Contributor

@ggetz ggetz commented Oct 22, 2025

Description

This is a follow-up to #12821 (comment) which applies some basic horizon culling (see Kevin's horizon culling blog post for more info) to the fallback depth test for billboards and labels.

It seems to be working pretty well for mid-level horizon views as well as at the global scale:

main this branch
Image Image
Image Image

And it seems to be working well for 3D Tiles as well, so I went ahead and removed the custom depthTestDistance callbacks in the Moon and Mars example.

Issue number and link

N/A

Testing plan

  1. Test billboard and label properties, particularly the following, with a) the default ellipsoid, b) terrain, and c) Google P3DT (3D Tiles):
  • pixelOffset
  • eyeOffset
  • horizontalOrigin
  • verticalOrigin
  • scale
  • showBackground /backgroundPadding
  1. Verify depth testing behavior of the Moon and Mars sandcastle examplws.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change I think this falls under the update for Switch from automatic to manual depth testing for billboards #12821
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@ggetz ggetz requested a review from mzschwartz5 October 22, 2025 15:33
@github-actions
Copy link

Thank you for the pull request, @ggetz!

✅ We can confirm we have a CLA on file for you.

@mzschwartz5
Copy link
Contributor

On the whole this works nicely, but I'm noticing some odd behavior on Mars and Moon. Sometimes the labels and points flash in and out when they should be visible:

moon.mov
mars.mov

I haven't noticed that issue on any WGS84 sandcastles, so I thought maybe it was related to some hardcoded uniforms. I stumbled across this issue, but it's already been solved. So I'm not sure what's happening here, but I still think this is an improvement, and if it only slightly affects other ellipsoids, that's not a terrible tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants