PackedDepthProgram

Depth caster that packs the fragment's window depth into the RGB channels of an RGBA8 color target (red = high byte, green = middle, blue = low). Used by the sightline depth pass on platforms without hardware depth-compare samplers (earth.worldwind.util.kgl.Kgl.hasShadowSamplers): there receivers read the cube through a plain samplerCube, and sampling a real DEPTH_COMPONENT texture that way is driver-dependent — Adreno 512 returns ~8-bit quantized depth, which collapses the sightline's 1/d depth mapping into kilometre-scale buckets and classified entire scenes occluded (worked at 2.0.5's moment-map color cube, broke at 2.0.6's depth cube). RGBA8 color reads are exact on every GPU. Packing mirrors DepthToColorProgram / DrawContext.readPixelDepth: depth = r + g/255 + b/255^2 on normalized channels.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Indicates the approximate size of the OpenGL resources referenced by this GPU program.

Functions

Link copied to clipboard
open override fun loadModelviewProjection(matrix: Matrix4)
Link copied to clipboard
fun loadRange(range: Float)

Face-axis range the packed linear depth is normalized by; load once per pass.

Link copied to clipboard
open override fun release(dc: DrawContext)

Frees any resources associated with this instance. After this method returns the rendering resource is invalid, and any associated GL object is deleted.

Link copied to clipboard