Drawable Sightline
Renders the active sightline: a depth pass that rasterises the scene into the shared depth-only cube map (DrawContext.sightlineDepthCubeTexture) from the sightline's point of view, and an overlay pass that tints terrain visible/occluded by PCF-comparing each fragment against that cube (see earth.worldwind.layer.sightline.SightlineReceiverGlsl).
The cube always covers the full sphere; the sightline's heading/field-of-view wedge is a receiver-side mask (360 degrees masks nothing). All six faces are rendered — photogrammetry receivers above the observer (city-canyon facades) are tinted correctly, unlike the terrain-era assumption that nothing is visible looking up.
Properties
Local (Z = up) frame of the sightline position; cube faces render in this frame.
Depth-pass shader — the same trivial depth-only program the sun cascades use.
Horizontal wedge angle about heading; 360 degrees covers the full sphere.
Packed-color depth caster used instead of depthProgram when DrawContext.sightlineUsesPackedDepth - see PackedDepthProgram.
Terrain overlay receiver shader; shares its GLSL with the embedded-receiver splice.
Selects which phases this drawable runs. The sightline shapes enqueue two drawables per frame: RenderMode.DEPTH_ONLY in BACKGROUND so the depth cube and DrawContext.sightlineState are populated before any embedded-receiver fragment shader runs (3D tiles need this), and RenderMode.OVERLAY_ONLY in SURFACE so terrain gets tinted after opaque receivers have rendered. RenderMode.DEPTH_AND_OVERLAY preserves the legacy single-drawable path for callers that don't split the work.
Functions
Renders the filled-triangle primitives of a DrawShapeState into the sightline depth cube. Shared between DrawableShape (interleaved attributes, passes its own DrawShapeState.vertexStride) and DrawableMesh (positions packed tightly in their own buffer, stride 0). Line-mode primitives within an otherwise filled state are skipped, and the state's DrawShapeState.enableCullFace preference is respected.
Composes the active face's matrices (cubeMapProjection × faceView × modelMatrix) and loads the result into the depth program's mvpMatrix uniform. SightlineOccluder implementations call this once before each draw call.
Convenience for occluders whose vertices are stored relative to a translated origin in world coordinates (the common case — terrain tiles, shape vertex origins, etc.).