/** * @role Utility * Shared constants and deterministic reference logic for GPU radix sorting. */ /** Depth precision retained by both the GPU radix path and WebGL worker path. */ export declare const RADIX_KEY_BITS = 24; /** Exact Float32 depth keys use every sortable IEEE-754 bit. */ export declare const RADIX_EXACT_KEY_BITS = 32; /** Four-bit digits keep the portable shader's workgroup memory requirements small. */ export declare const RADIX_BITS_PER_PASS = 4; export declare const RADIX_BUCKETS: number; export declare const RADIX_PASS_COUNT: number; export declare const RADIX_KEY_MAX: number; /** * Radial keys are warped toward the camera, so 16 bits keep sub-millimetre * steps near the viewer (about 0.5 mm at 1 m in a 300 m range, where a * uniform 24-bit key spends most of its codes on far, sparse depths) and * the sorter runs four passes instead of six. */ export declare const RADIAL_RADIX_KEY_BITS = 16; export declare const RADIAL_RADIX_KEY_MAX: number; /** Number of four-bit passes required for one unsigned radix key width. */ export declare function radixPassCount(keyBits: number): number; /** * Maps a Float32 bit pattern onto unsigned integer order without losing depth * precision. Ascending mapped keys are ascending numeric floats, including * negative view-space Z values (farther splats first in VLAM's convention). */ export declare function sortableFloat32Bits(bits: number): number; /** Quantizes a depth into the unsigned 24-bit key used by the GPU sorter. */ export declare function quantizeDepthKey(depth: number, minimum: number, maximum: number): number; /** * Stable CPU reference for validating the GPU's six four-bit radix passes. * This is deliberately test/debug-only logic, not the WebGL production sorter. */ export declare function stableRadixSortReference(keys: Uint32Array, values?: Uint32Array, keyBits?: number): Uint32Array; /** * CPU reference for the GPU radial key. `depth` is the negated radial * distance (nearer is larger), and `u = 1` is the nearest depth in range. * `1 - sqrt(1 - u)` is monotonic, with its finest steps at the camera. */ export declare function quantizeRadialKey(depth: number, minimum: number, maximum: number): number;