/** * Octahedral impostor for item-lod/1: 8 x 8 views of the item on the full-sphere octahedral layout the tree * impostors already use, in one 512 px colour atlas encoded as UASTC KTX2. Capture runs in the shared headless * placements capture host (bundled Chromium, localhost-only, slot-capped), so no new browser path is introduced. */ export declare const IMPOSTOR_SIZE = 512; export declare const IMPOSTOR_VIEWS = 8; export interface ImpostorFraming { center: [number, number, number]; /** Orthographic half-width of every view; the bounding sphere with a 15 percent margin. */ radius: number; } export declare function impostorFraming(bounds: { min: readonly number[]; max: readonly number[]; }): ImpostorFraming; /** * How the impostor's atlas is shaded. `lit/1` (the default): each view is rendered with the item's real materials (metal, * clear coat, glass, emission) under one neutral outdoor rig, so a white roof, blue-grey flanks, black glass and red lamps are * in the pixels; the runtime only scales the light, per channel, against the rig (`octahedralImpostorPool` in the engine). * `albedo` is the original unlit capture (item-lod/3 artifacts), which the runtime lights flat. * `gbuffer/1` is not an atlas of colour at all but of materials (albedo, normal, roughness, metalness, glow, clear coat) on the hemi-oct/1 layout, * captured and encoded by `gbuffer.ts`; this file's single-atlas capture refuses it. */ export type ImpostorShading = 'lit/1' | 'albedo' | 'gbuffer/1'; export declare const IMPOSTOR_SHADING: ImpostorShading; /** The atlas stores the lit radiance at this fraction (headroom for 8 bits): the runtime multiplies by 1 / IMPOSTOR_BAKE_SCALE. */ export declare const IMPOSTOR_BAKE_SCALE = 0.5; /** Each view is rendered at this many times its size per side and box-filtered down: anti-aliased edges and alpha. */ export declare const IMPOSTOR_SSAA = 4; /** * The neutral rig a lit impostor is baked under, in the engine's light units scaled by IMPOSTOR_BAKE_SCALE (a noon Home is a sun of * 2.85, a hemisphere of 0.55, an environment of 0.7). The sky is an azimuth-symmetric gradient dome (so the item's yaw does not matter), * the sun is attached to the camera (upper left, toward the viewer) so every view is lit the same way relative to the viewer. */ export declare const IMPOSTOR_RIG: { readonly sky: { readonly top: readonly [0.55, 0.8, 1.3]; readonly mid: readonly [0.85, 1, 1.35]; readonly horizon: readonly [1.1, 1.15, 1.2]; readonly ground: readonly [0.3, 0.28, 0.25]; }; readonly envIntensity: 0.35; readonly hemi: { readonly sky: readonly [0.39, 0.61, 1]; readonly ground: readonly [0.3, 0.28, 0.25]; readonly intensity: 0.275; }; readonly ambient: 0.03; readonly sun: { readonly color: readonly [1, 0.902, 0.765]; readonly intensity: 1.425; readonly dirCam: readonly [-1, 1.4, 1.2]; }; }; /** RGBA, bottom row first (render-target order), exactly as the tree atlases are stored. */ export declare function captureImpostorAtlas(captureGlb: Uint8Array, framing: ImpostorFraming, size?: number, shading?: ImpostorShading): Promise; /** Dilate colour into empty gutters (no black fringes under filtering), then UASTC KTX2 with mips. */ export declare function encodeImpostorAtlas(atlas: Uint8Array, size?: number): Promise; /** A top-row-first PNG of the atlas for human review; not part of the artifact. */ export declare function impostorPreviewPng(atlas: Uint8Array, size?: number): Promise; /** Fraction of atlas texels with any coverage; a blank capture reads near zero. */ export declare function impostorCoverage(atlas: Uint8Array): number;