export declare const LENS_MAX_SAMPLES = 50; export declare const LENS_MAX_TAPS: number; /** The shared emit context one composition's stages append into. */ export interface LensEmitFrame { /** The fresh local prefix for every WGSL identifier this fragment declares. */ p: string; /** The statement stream, emitted at the end in order. */ stmts: string[]; /** Emit a uniform read. */ U: (name: string) => string; /** Format a number literal. */ L: (n: number) => string; /** Per-composition counter so each value-noise instance gets unique locals. */ noiseIdx: { value: number; }; } /** * hash21-based 2D value noise (Paper's proceduralHash21 + valueNoise), emitted inline as * statements into `lines` (statements can't declare WGSL functions). Used by the spread-axis * noise turn, the grain mixer and the grain overlay. */ export declare function valueNoiseStmts(em: LensEmitFrame, lines: string[], inputExpr: string, outName: string): void; /** * Stage 1 — lensGeometry: the geometry base (lens centre, radius, spread reach) and the lens * warp — barrel/pincushion bulge + circular crop squeeze — ending at the warped `baseUV`, its * pre-loop derivatives (fwidth/dpdx are illegal in non-uniform control flow, so ALL derivative * work happens here, before the fan loop) and the grain UV. */ export declare function lensGeometryStmts(em: LensEmitFrame, uvExpr: string, aspectExpr: string): void; /** * Stage 2 — spreadAxis: the spread direction (uniform angle → radial burst by `perspective`, * forced radial near the circle crop), the centre/edge focus masks and margin cut that shape * the strength, then the optional noise turn and grain scatter of the resulting axis. */ export declare function spreadAxisStmts(em: LensEmitFrame): void; /** The frame AA mask stage of one fan tap: anti-aliased UV frame (transparent outside the child * bounds), using the pre-loop footprint (taps are near-constant offsets of baseUV, so the * footprint is the same to first order). */ export declare function frameAAMaskStmts(em: LensEmitFrame, body: string[]): void; /** * Stage 3 — spectralFan: the ATOMIC gather core. Irreducible as WGSL: a RUNTIME-count loop with * per-iteration texture sampling (the Expr factories can't express it), whose per-tap hue * weights, over-white colours and coverage all accumulate into shared sums — no sub-stage * separates without re-walking the taps. Samples the child RTT once per colour layer along the * fan (bias-curved spacing, per-tap swirl around the centre, the frame AA mask above), then * recombines the weighted average over white into a reconstructed premultiplied colour. * * The loop bound is ADAPTIVE per pixel — capped at one tap per screen pixel of fan travel * (× the bias-curve stretch), so the focus zones (where the fan is sub-pixel and the weighted * average cancels exactly to a single sample) cost 2 taps instead of `count`. */ export declare function spectralFanStmts(em: LensEmitFrame, texKey: string): void; /** Stage 4 — grainOverlay: post-processing black/white grain on the premultiplied result. */ export declare function grainOverlayStmts(em: LensEmitFrame): void; //# sourceMappingURL=lensParts.d.ts.map