I am representing an object using a combination of a polyline and a billboard entity, where the billboard acts as a label positioned on the line.
Requirement
My requirement is:
-
The label (billboard) must be rendered in front of the polyline
-
The entire object (polyline + label) must be rendered on top of all other objects in the scene
Current Implementation
To disable depth testing, I am currently using the following settings:
- For the polyline primitive:
renderState: {
depthTest: {
enable: false
}
}
- For the billboard entity:
disableDepthTestDistance: Number.POSITIVE_INFINITY
Problem
With this implementation:
-
The polyline is rendered on top as expected
-
However, the billboard (label) is rendered behind the polyline
As a result, I cannot satisfy the requirement that the label should appear in front of the polyline, while also keeping the entire object always rendered on top of other scene elements.
Question
-
Is there a way to render a polyline and its billboard together as a single object, such that:
-
the billboard is always rendered in front of the polyline, and
-
the whole object is always rendered on top of all other entities?
-
-
Alternatively, is there a more appropriate approach (for example, using different primitives or render order control) to achieve this behavior?
Any guidance would be appreciated.