/**
 * Build a max-reduction Hi-Z height pyramid from a single-channel float
 * heightmap sampler.
 *
 * Each pyramid level k holds, per texel, the maximum height across the 2×2
 * block of level k-1 it covers. A ray trace can then skip whole cells
 * safely: if the ray's height is strictly above the cell's max-height at
 * any level, the cell can be advanced past without checking any finer level.
 *
 * Storage layout — **DataTexture2DArray, one mip per layer**, all layers at
 * full mip-0 resolution. Smaller mips are nearest-upscaled into their layer.
 * The shader samples mip k via `texture(heightMap, vec3(uv, float(k)))`.
 *
 * This sidesteps the three.js r136 bug in `WebGLTextures.uploadTexture`
 * where DataTexture custom mipmap chains are uploaded with `texSubImage2D`
 * called with level hardcoded to 0 — every "mip" smashes the previous one
 * into level 0 and the actual mip levels 1..N are left uninitialized. The
 * 2DArray upload path uses one `texSubImage3D` call to level 0 covering
 * all layers, so it works correctly.
 *
 * Memory cost is (mip_count × W × H × 4) bytes versus (≈ 4/3 × W × H × 4)
 * for a true mip pyramid — about a 3× overhead, traded for correctness.
 *
 * Non-power-of-two heightmaps are handled by halving with floor and stopping
 * once both dimensions reach 1.
 *
 * @param {Sampler2D} sampler  single-channel Float32 heightmap (itemSize=1)
 * @returns {DataTexture2DArray}  R32F array texture; depth = mip count
 */
export function build_max_height_pyramid(sampler: Sampler2D): DataTexture2DArray;
import { DataTexture2DArray } from "three";
//# sourceMappingURL=build_max_height_pyramid.d.ts.map