/** * 24-bit RGB packing for linear view-space depth used by GPU splat picking. * * Depth is stored as a normalized value in [0, 1] mapped across the camera * near/far range, then quantized into three 8-bit channels (R = high byte). * This matches an RGBA8 render target without a depth-texture readback path. */ import * as THREE from 'three/webgpu'; /** * Packs a normalized depth in [0, 1] into 8-bit RGB (high → low). * Values outside [0, 1] are clamped. */ export declare function packNormalizedDepth(normalized: number): { r: number; g: number; b: number; }; /** * Unpacks 8-bit RGB channels back to a normalized depth in [0, 1]. */ export declare function unpackNormalizedDepth(r: number, g: number, b: number): number; /** * Maps a positive linear view-space depth (OpenGL: −z) into [0, 1] using the * camera near/far plane. Clamps to the range. */ export declare function normalizeViewDepth(viewDepth: number, near: number, far: number): number; /** * Inverse of {@link normalizeViewDepth}. */ export declare function denormalizeViewDepth(normalized: number, near: number, far: number): number; /** * Reconstructs a world-space hit from NDC and a positive view-space depth * (−z in OpenGL camera space). Writes into `outPoint` and returns camera * distance. The camera must have an up-to-date world matrix. */ export declare function unprojectViewDepth(ndcX: number, ndcY: number, viewDepth: number, camera: THREE.Camera, outPoint: THREE.Vector3): { point: THREE.Vector3; distance: number; };