ViewshedKernelShaderProgram

GPU kernel shader for earth.worldwind.shape.ViewshedSightline. Renders a fullscreen triangle over an N×N off-screen FBO; each fragment performs an Amanatides–Woo grid traversal from the observer to its own target cell, sampling elevations from an R32F texture and writing RGBA8 visible / occluded / transparent. The result is read back to CPU and projected via earth.worldwind.shape.SurfaceImage.

Requires GLES 3 / WebGL 2 / GL 3.3 core: the kernel uses texelFetch, sized float-format texture sampling, and the out vec4 fragment output. glslVersion is overridden to emit #version 300 es / #version 330 core rather than the legacy 1.20 directive.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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

Functions

Link copied to clipboard
fun loadArea(mode: Int, halfX: Float, halfY: Float)

mode = 0 for circular AOI, 1 for rectangular. halfX / halfY are half-extents in pixels.

Link copied to clipboard
fun loadEarthRadius(meters: Float)
Link copied to clipboard
fun loadGridSize(width: Int, height: Int)
Link copied to clipboard
fun loadMaxSteps(steps: Int)

Walk-iteration cap; callers pass width + height, the exact bound on |dx| + |dy|.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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