CesiumGS / CesiumGS/cesium

Globe translucency not impacting polylines

Open
#13,558 2 comments 0 reactions 0 assignees View on GitHub
needs triage type - bug
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

### What happened?

Hello!
When setting those options:

```ts
viewer.scene.globe.depthTestAgainstTerrain = true;
viewer.scene.globe.translucency.enabled = true;
viewer.scene.globe.translucency.backFaceAlpha = 1;
viewer.scene.globe.translucency.frontFaceAlpha = 0.9999;
```

The polylines are almost not opacified. It seems like when translucency.enabled is set to true and frontFaceAlpha different from 1, the polylines are always visible as if they where above terrain (but we should barely see them).

### Reproduction steps

1.Display polylines above and under globe
2. Display terrain
3. Set viewer.scene.globe.depthTestAgainstTerrain to true
3. Set viewer.scene.globe.translucency.enabled to true
4. Set viewer.scene.globe.translucency.frontFaceAlpha to 0.9999
...

### Sandcastle example

https://sandcastle.cesium.com/#c=vVZtb9owEP4rFp9oBQHaoqqUVgNKW2kUUEZXTWUfTHIQq44d2Q6ITv3vOyeBUgprJnVDAuXO99zL89gOLIykMuSQUE06oFkckqmSIRkXvMQaF87HYiwqhwQ0Z8KUfabphAMRshyLWINfnlOlyWHFhnlSaEPmDBagyAURsMiSOt8TX3GVtiOFoUyAGhcOkgIpxtEeCHBmXE7A8SEywQi0ac0wVJsRKIUPmNeoGM53YoyiQvMYPd7SAWE79fMDJtR7uqYetHgUUITVcmCQLWE2QVXnDD/nr3Qo8Hs4Ki5luUAYZhhoh/p+8ddYECJoCA3k3MVuuY2Vgph03HGhZCMiyZd2pUESgHVoTIIFGiuKO1QZfKLi2DYVXsFMAegWZlkWH8un9RI5xm+5dpQ8/TwopYkWzDdBg9QzM6RYmFH+mlZyqRy3e5UFeJyG0UjeKBkLv5FQm6y84O/Lwcbctrxwgzic5B3/xiKIspCEhv89O1XeaBnBOmsrtR339v6u/Wd+btxut7+HBy4XTMxyk5CGkwmP4XUzBEB0rKa4zz6VlNM1KafbpNSq7ybeOM/DrLzt9i4LGCoZgTLLYtYRSUYfSpy3gcfiqLRyG4pxa3997fcslVvEdgZu/7o3eOi67d59Nwt9OdhNtcSTOYNBbGxrfh62Bwki5XnBTIC04yVAZJqCUEMCYLPAECp8MpU8E+ez9bhNiuji44qKVJ6zEqlXq2uN0FyJ8vHx3SFWRsx+vXYJMHBb/ZvuWqOMmYe07NG2v7MjQ7vX6nz9QLkoVhEH5EIu8sg2TMKJxqs4VScBrtX6h5qcHL/RxJpla++WZX2I9l0t/UG/m0e6hJl3wr2heXjvDnvdPfz6VAf530Nte/ekkM+7iPfwWX/LZ33/Hj/JQ9QVdv13G7zzo9Xfuzszqp6lDEeyuEWcDSmUCk1tlhwuLfILS/9PxYoXHadiIIw4NqMrk9h7AuN4OgE1KytI02dzwvyLHX+M7JtWa1yZxpx/Y8+owmWzgvFvYFxSH2+kwRwUp0sbEtQue6nTcZxmBc33KCMln1C1kfE3

### Environment

Browser: Edge 148.0.3967.96
CesiumJS Version: Cesium 1.142.0
Operating System: Windows 11

### AI acknowledgment

- [ ] I used AI to generate this issue report.
- [ ] (If the above is checked) I have reviewed the AI-generated content before submitting.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sandcastle example and reproduce the issue using Globe translucency, depthTestAgainstTerrain, and polylines. Trace the globe translucency and polyline rendering entry points to determine why frontFaceAlpha 0.9999 does not opacify terrain-hidden lines. Done means polylines under the globe are barely visible while lines above terrain remain visible, with the relevant rendering tests passing if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.