DrawableGaussianPass

Reduced-resolution offscreen pass for the frame's Gaussian-splat tiles. Splat rendering is blended-fill-rate bound — the same splats at half resolution cost ~4x less fragment work — so all DrawableTileGaussians of one layer render back-to-front into a renderScale-sized offscreen target and composite over the scene as a single premultiplied full-screen quad.

Terrain is rasterized depth-only into the pass target first (camera MVP, same LEQUAL test as the main pass) so opaque ground still occludes splats exactly like the direct path. The composite itself is a screen-space overlay: per-pixel depth interleaving with other transparent SHAPE drawables collapses to this drawable's single queue depth.

Falls back to direct full-resolution child draws when the platform lacks sized texture formats (no depth-texture attachment) or a program is missing.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Depth-only program for the terrain occlusion prepass. Deliberately NOT the shadow/sightline earth.worldwind.render.program.DirectionalDepthProgram: its caster pancaking is wrong under the camera's perspective projection (see SceneDepthProgram).

Link copied to clipboard

Nearest child depth — the queue key for the composite among other shape drawables.

Link copied to clipboard
var owner: Any?

Stable identity keying this pass's framebuffer ping-pong pair (the owning layer); distinct owners get distinct pairs so multi-layer frames keep the double-buffering.

Link copied to clipboard

Offscreen target scale in (0, 1); the pass renders at viewport * renderScale.

Link copied to clipboard

World-space bounding sphere center used to skip cascades whose AABB doesn't intersect this caster. Default null opts out of culling — the caster is dispatched into every cascade. Implementations populate this from their shape's boundingBox.center to gain per-cascade culling.

Link copied to clipboard

World-space bounding sphere radius. Only consulted when shadowCasterCenter is non-null.

Functions

Link copied to clipboard
fun addChild(child: DrawableTileGaussian, depthSq: Double)

Collects a splat tile; children are recycled by this pass, not the drawable queue.

Link copied to clipboard
open override fun draw(dc: DrawContext)
Link copied to clipboard
open override fun drawShadowDepth(dc: DrawContext, shadow: DrawableShadow)

Cascade depth pass: delegate to children — each checks its own shadow mode.

Link copied to clipboard
open override fun recycle()