/** * Basis encoders for item-lod/1 textures. The sceneHlod encoder is UASTC-only; a level texture picks per texture between * ETC1S (smallest, lossy), RDO-tuned UASTC and plain UASTC, so this module reaches the same installed WASM encoder and * exposes all three. */ export type BasisMode = 'etc1s' | 'uastc-rdo' | 'uastc'; /** Tuned in the item-lod round 2 measurements: ETC1S quality 128, RDO UASTC scalar 2 (about a third smaller than plain UASTC). */ export declare const BASIS_SETTINGS: { readonly etc1sQuality: 128; readonly etc1sCompression: 2; readonly rdoScalar: 2; readonly uastcFlags: 2; }; /** Encodes RGBA8 pixels as a mipmapped KTX2. Deterministic for a given input and mode. */ export declare function encodeBasis(data: Uint8Array, width: number, height: number, color: boolean, mode: BasisMode): Promise; /** * Peak signal-to-noise ratio (dB) between the encoder input and what the file decodes to (base mip). `weights` (one per pixel) * makes it a weighted error: an atlas weights every pixel by how much surface it is drawn on, so a small palette strip that * paints most of a car counts for what it covers rather than for the few pixels it takes. */ export declare function basisPsnr(reference: Uint8Array, ktx2: Uint8Array, weights?: Float32Array): Promise;