import type { ColorLut, ColorTransformFunction } from '@flighthq/types/contract'; /** * Baked-LUT math: compose a stack of pointwise rgb→rgb transforms into ONE 3D color lookup table, and * sample it. This is the LUT-tier fuse (the sibling of colorMatrixMath's `fuseColorMatrices`): where a * run of adjustments is not a pure affine matrix (gamma, hue/saturation, a supplied grade LUT), it * bakes into a single `ColorLut` evaluated once at each cell and applied as one trilinear tap. The * transforms must be continuous — the trilinear tap interpolates between cells, so hard-step ops * (posterize, threshold, quantize) are Effects with a dedicated per-op pass, not LUT adjustments. * * All color values are normalized `[0, 1]`. `samples` is `size³ · 3`, R fastest then G then B: cell * `(ri, gi, bi)` starts at `((bi · size + gi) · size + ri) · 3` (see the ColorLut type). */ /** Default per-axis LUT resolution. 32³ balances quality against upload/memory; raise it to cut banding. */ export declare const COLOR_LUT_DEFAULT_SIZE = 32; /** * Bakes a stack of rgb→rgb transforms into one `ColorLut` of `size` cells per axis. The transforms apply * left-to-right (index 0 first) at each cell's unit-cube coordinate; an empty stack yields the identity * LUT. Evaluating the composed function once per cell is the whole point — arbitrary nonlinear stacks * collapse to a single texture without a per-op pass. Allocates the LUT. Baking is CPU-only (do it once * per stack, not per frame); larger `size` reduces banding at an `O(size³)` cost. */ export declare function bakeColorLut(transforms: ReadonlyArray, size?: number): ColorLut; /** * Trilinearly samples `lut` at normalized `(r, g, b)` (clamped to the cube) and writes the RGB result * into `out`. The CPU counterpart of the GPU's hardware-filtered 3D texture tap; used by the Canvas LUT * pass and by tests. Alias-safe with respect to `out`. */ export declare function sampleColorLut(lut: Readonly, out: [number, number, number], r: number, g: number, b: number): void; //# sourceMappingURL=colorLut.d.ts.map