CesiumGS / CesiumGS/cesium

Support depthFailMaterial for clamped polylines

Open
#8,635 0 comments 0 reactions 0 assignees View on GitHub
category - polyline type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

I couldn't find an issue on this, but it appears that depthFailMaterial is not support for polylines that are clamped to ground. This Sandcastle example works around this issue by not clamping the polyline to ground, and instead sampling the heights of the terrain:

https://sandcastle.cesium.com/index.html?src=Clamp%20to%20Terrain.html

(Click the "sample line positions" in the dropdown).

[Here's a version of this](https://sandcastle.cesium.com/index.html#c=tVVbb9MwFP4rVl9IRXBzj7OVidKVaWJj01YxIcqDl3ithRtHttNR0P47J7c2Yxs8kRfXx9+5fMc+XzdUoQ1n90yhtyhn92jKNC/X+HNts16l9XYqc0N5ztQrG/1a5Ag+w5QC06WSG54xddA5popRw26kEtm8gVjDRf4wPFzkTR6sU5YzvBTyluGMFWY1Z9pMloDUpnWBWowqGfiAF1QoWL40K7C6juPsrNpQZc5khW6Tn1OzwkZe0YzTXFskwknox4lfZwcPlmf/wJMkCpJ4uM9MzYtwL8YJIV7Yg7dduabrQrBLqbnhMtcQ4es3wNxJhawKxsHiHMIybqkdotev+bDrbZ34SZ2CqcJqGNg77jYEGSGrbdAb5A6rYrogRVvB47udgqtcKlqseGqJKgaw7NyeZ4CLUq+sLlyFfagpNzfKcgN2pjHNMqvlUEixFfBk0EHHqvpSAXHn8kTJMs8O6ku296fFrmG75zQTghda8gzfnFyTAKe92idQ6XYuKzoApnm9t54nMOyloSqdbwu2TzJpDPhkdnE8uz6d9rD3PIO+HqCwZ1vDA1ecCjD3unrZEr4oTbWctyAYkIIps7V6Xag7IQW8hl0J02qLL64mn05m9mOkbALetJV4zx9Pn4v3/mwy/biHP/S7UI/eB8rF+X+jczU7/o9cmt8Prbi080fVkpmnz71+H77lO04cOzh0SOz5JPFJYKMw8oPE9bDru34ShCS0kZfExA097JEoDIPQdaNOQOTdnf5LfAgV4CQOnIREMQkjz0ZvQH6wH7hJnBCHuHHgQvwgSUCZHEIiJ458N/J68pjSNVMUCym/T4zVELLbxC/B5gr0CNRlbe0FQ/EfAT49nn2an86/DA8H9mCszVawo6Zv7/i6kMqgUgkL45FhMC5wx3p0W6bfmcGp1lW28ahzGmd8g3j2djH44z9hMajGWms4uSuFuOY/2WJwNB4B/pGbkKCb+fJiw5Sg2wqyco/OGiPGeDyC7VMvI6W4pZCkrbt30gz6OcvLXr7HmJ9Srt+XxoACvIgBPVkKdsaXKwOVvAjTtaA8DdatvwE) that uses `clampToGround: true`. Notice depthFailMaterial has no effect and there is no warning or anything.

Is this just a matter of threading the depthFailAppearance down into `StaticGroundPolylinePerMaterialBatch.js` ? If there's a more fundamental reason why clamped polylines can't use depthFailMaterial we should issue a `oneTimeWarning` explaining that instead of silently failing.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Clamp to Terrain Sandcastle example and inspect StaticGroundPolylinePerMaterialBatch.js, especially how depthFailAppearance is handled for clamped polylines. Determine whether depthFailMaterial can be supported; done means it takes effect in the example, or a one-time warning clearly explains why it cannot.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.