Ogc3dTilesPointsProgram

open class Ogc3dTilesPointsProgram(shadowsEnabled: Boolean = false, sightlineEnabled: Boolean = false) : AbstractShaderProgram, ShadowReceiverProgram, SightlineReceiverProgram

Color-pass shader for 3D Tiles point cloud content (.pnts). Renders GL_POINTS with size-attenuated round splats: each point's gl_PointSize is set to basePointSize * focalLengthPixels / eyeDepth so points look uniform across the view, and the fragment shader uses a gl_PointCoord disc mask to clip to a circle.

Receiver gating mirrors Ogc3dTilesProgram: same #ifdef SHADOWS_ENABLED + #ifdef SIGHTLINE_ENABLED splices, same four variants resolved by get from RenderContext.hasShadowLayer + RenderContext.hasActiveSightline. Points receive both shadows and sightlines.

Inheritors

Constructors

Link copied to clipboard
constructor(shadowsEnabled: Boolean = false, sightlineEnabled: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
open override var shadowUploadStamp: Long

Frame stamp of the last ShadowState whose uniforms were uploaded into this program. GL uniforms are program-state and persist across draw calls, so once a program has been loaded with the current frame's cascades it doesn't need to be loaded again until the cascades change. Implementations declare this as a plain var field, default -1L.

Functions

Link copied to clipboard
fun enablePickMode(enable: Boolean)
Link copied to clipboard

Per-tile point size in pixels at 1 meter eye distance (size attenuation scales this inversely with depth). Defaults to 4.

Link copied to clipboard

Focal length in pixels = viewportHeight / (2 * tan(fov / 2)). The size attenuation formula basePointSize * focalLengthPixels / eyeDepth gives uniform on-screen size.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun loadOpacity(value: Float)
Link copied to clipboard
Link copied to clipboard
open override fun loadShadowDisabled()

Disables shadow sampling. Receivers' fragments fall through to a fixed 1.0 visibility.

Link copied to clipboard
open override fun loadShadowEnabled(state: ShadowState)

Enables shadow sampling and uploads the cascade matrices, split depths, texel sizes, light direction and fade distance from state. Cascade sampler bindings (GL_TEXTURE1..4) are baked in at program init time; the caller is responsible for binding the matching cascade depth textures to those units before invoking this method — applyShadowReceiverUniforms does both in lockstep.

Link copied to clipboard
open override fun loadSightlineDisabled()
Link copied to clipboard
open override fun loadSightlineEnabled(state: SightlineState, localMatrix: Matrix4)
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