CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.97k stars 3.5k forks source link

Both SampleHeight and ClampToHeight creates a hole in entity when the entity is directly below the camera #12221

Open CommName opened 1 month ago

CommName commented 1 month ago

What happened?

What happen: When using Scene.sampleHeight o rScene.clampToHeight function it create a hole in entities that are directly below the camera (see attached screenshots). I tried to call both functions both from clock.onTick event listener and in CallbackProperty but I experience same behavior. For reference: I tried to create a line where one point is in the sky and the other moves dynamically on the ground. Screenshot from 2024-09-27 15-50-18 ![Screenshot from 2024-09-27 15-49-56](https:/ Screenshot from 2024-09-27 15-49-50 /github.com/user-attachments/assets/ccd4c263-9d94-477c-a33e-0ee9744b1e92)

Reproduction steps

Minimal steps to reproduce the bug

  1. Create a polygon entity with videoElement for material
  2. Add event listener for clock.onTick
  3. Call sampleHeight or ClampToHeight method
  4. Position camera directly above entity

Sandcastle example

https://sandcastle.cesium.com/#c=tVTbbts4EP0Vwn2RAYdymg2SOK7RNg3QAlm0aIoCi/WioMmxRZTiaMmRXW2Rf+9IlGInvWBfasASOZdzzgxH1Ogjia2FHQTxTHjYiSuIti7lx86WLUe621+hJ2U9hOVoIr4uvRCxwN178AbCDWJ1HQKGOBNr5SJMen/tzAtvS0UwExTq1n43vlz6pdc9rwG8dlCCJ2Y3qOt2KTdAvfVl88awBgrKupb7u2xOS+olR1uyEKUyJusUVhjZgn421HSlAvFK+RO5Dli+gk0AiNnR2cVEnPB/Op6kPNds2rQORYjCQlBBF83ssEHvUtTrwZmlYPFrshchqCb7++jsnCnPJ4ma1/cakufin3GCS4qEaJsYrHKzB03rnHf7tvatiBo8SK1KliYjUHuWqSUGIlmv/l9XzuVpK659Hp9O+ZfEYLBM3WN8HaquLOniHvNPRYUkfK8M4zLWxbSr5+6xUu1Qf5boP1h+8cFdbxn6xkbiAkK2rr1uaUTWxY0HNrvOHlQaVVk5eA12U9BtXVXIBZnxXlual2EceGQOKsdNUFVh9c8m4vIhiFau1o4Pw7zbw/1UTDZwDjD7Bowmo3mkxsFiIHhuy1a5qIPLpMwJGIeJYr6q9WcgqWNMqSn8Sf9R7Ms8nHi1iuhqgsu9c4VEWM7E2Wn15cAcWqEzMT0w7awhPsuTp9MHkQWk0OPzQ/tdWszzoZp+b+xWWPPsBxeI4AbGyJ517dyt/Q+Wo8U85/jF41SHPEB+83YLwammDSuOFzfJKKWc57z9cSYhupUKB8h9RLo1Usxwq4iSO9VaeKlqQu57k3aOr7a00gFj5NHfWN8buKCALna7+0OcR6yDBhGDZkdBVMVZnqcWSI1lXtUrZ3V+q7zRKpKD225eXilS+cpujtrD5of3zaden9zBqmRCaipgzK6APNl+K21Z/fGYtTP9XlLcPib9t+bLgWwJB9R/MbNYBdxF/gAMQhQeScT07QsqQMw1Glh0CPO8WwtIl6YcBrZz9pDfAA

Environment

Browser: Chromium, FireFox CesiumJS Version: 1.119 - 1.121 Operating System: Ubuntu 22.04, Ubuntu 20.04

CommName commented 1 month ago

Just found a similar issue #12017