import { Document } from '@gltf-transform/core'; export interface BakeResult { size: number; /** Texels rasterized from the source surface. */ sampled: number; /** Gutter texels filled by dilation. */ dilated: number; /** Sampled texels whose closest source point was suspiciously far (> 2% of the bbox diagonal). */ far: number; } /** * Re-bakes the SOURCE document's base-color texture onto the (decimated, freshly unwrapped) target * document. For every texel of every target triangle: barycentric -> 3D point -> closest point on the * SOURCE mesh (BVH) -> source UV -> bilinear sample of the source texture. Layered surfaces (hair shell * over scalp) are disambiguated by preferring source triangles whose facing agrees with the target * triangle when their distances are comparable. Unwritten texels are dilated outward into gutters so * bilinear/mip filtering never bleeds background into charts. Base color only — imports carry a single * baked atlas by contract (the conform pipeline drops other maps). */ export declare function bakeBaseColor(target: Document, source: Document, outSize: number): Promise;