import { type DataTextureLoaderTexData, type WebGPURenderer } from 'three/webgpu'; import { type HDRInput } from './nodes/SDRRenditionNode'; /** * Finds the min or max value of each RGB channel of an HDR image, on the GPU. * * The image is reduced by 2x2 cells until it's 1x1, then the single remaining pixel is read back. * Negative values are ignored when looking for the max, values above 65504 (max half float) when looking for the min. * * @category Utility * @group Utility * * @example * import { findTextureMinMax } from '@monogrid/gainmap-js/encode/webgpu' * * const [r, g, b] = await findTextureMinMax(exrTexture, 'max', renderer) * const maxContentBoost = Math.max(r, g, b) * * @param image the HDR image: a texture, raw texture data or a TSL node (which requires `size`) * @param mode * @param renderer * @param size size of the image, required when the image is a generic node * @throws {Error} if the image is a generic node and `size` is not provided */ export declare const findTextureMinMax: (image: HDRInput | DataTextureLoaderTexData, mode: "min" | "max", renderer: WebGPURenderer, size?: { width: number; height: number; }) => Promise<[number, number, number]>;