-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Billboard clamps too high to terrain? #4062
Comments
I can't reproduce this in master. @pjcozzi can you confirm and close? |
Pretty sure I just forgot to turn terrain on when I tested this. whoops. The problem is actually pretty bad and happens by jumping to most billboards. Some end up above the ground, some under the ground. I've also had some problems with disappearing labels (I think they are improperly being placed under ground like the billboards: It's possible this is a different issue, but unlikely. |
Is this #2694? |
No, they are two different issues. This issue is a nasty race condition in terrain clamping which is causing each letter to be placed in the geographically incorrect position instead of on the terrain itself. #2694 is a draw order issue and requires us treat labels as special so they always get drawn above terrain if their origin is visible (or something similar). |
Turns out that billboard and label clamping were fundamentally broken because the `QuadtreePrimitive` was processing the tile queue in the wrong order. It was always pulling new tiles from the back of the array rather than the front, which meant that data would get processed in the wrong order causing old tiles to take precedence over newer tiles. Addtiionally, there was a bad if block in `Label.js` which caused the initial position of the individual label billboards to not be properly set when clamping was on, instead we should always set the positions before calling `_updateClamping` (if needed). Fixes #4396 and #4062
The problem seems to be picking upsampled terrain. A quick check by disabling upsampling looks like it fixes the problem, but requires more testing. |
Open the KML Sandcastle example:
Turn on AGI World Terrain, then zoom to "Nevada Test Site Area 26." The label is floating way above terrain. Shouldn't it clamp to the highest resolution loaded?
The text was updated successfully, but these errors were encountered: