import type { EnvironmentField, EnvironmentSample } from "../world/envField.js"; import type { MaterialSurfaceParameters } from "./materialAsset.js"; /** Resolved dry values from one assigned surface, after imported and instance edits. RGB is linear. */ export interface MaterialAppearanceBaseline { roughness: number; colorLinear: readonly [number, number, number]; sheen?: number; clearcoat?: number; clearcoatRoughness?: number; } /** Opt-in wet endpoints. Color retention multiplies linear albedo; it never replaces the authored hue. */ export interface MaterialWetnessPolicy { influence?: number; roughness?: number; colorRetention?: number; sheen?: number; /** Requires an already physical material; omitting this preserves imported coat without enabling a new one. */ clearcoat?: { strength: number; roughness?: number; }; } /** Local appearance only. Wind is a separate geometry/simulation input, and no field creates motion. */ export interface MaterialAppearancePolicy { wetness?: MaterialWetnessPolicy; /** Sky-exposure attenuation of existing hair-card backlighting; this is not a shadow or scattering model. */ cardBacklightExposure?: boolean; } /** Sparse edits for one sample. Unrequested imported parameters, textures, coverage and transmission stay intact. */ export interface MaterialAppearanceResponse { surface: MaterialSurfaceParameters; colorLinear?: [number, number, number]; backlightExposure?: number; wetness: number; } /** * Resolve one surface from an immutable dry baseline, avoiding cumulative drift. Wetness already includes * field shelter; neither exposure nor sheltered is multiplied into it again. No accumulation or drying simulation. * @capability material-appearance-signals adapt selected surface response to sampled wetness and local card exposure */ export declare function resolveMaterialAppearance(sample: EnvironmentSample, baseline: MaterialAppearanceBaseline, policy?: MaterialAppearancePolicy): MaterialAppearanceResponse; /** Explicit sample position; callers schedule a bounded set of visible or relevant targets. */ export interface MaterialAppearanceTarget { x: number; z: number; y?: number; time: number; } /** * Exactly one field sample per target; no traversal, subscription, hidden tick, or full-world scan. * @capability material-appearance-signals sample one explicitly scheduled appearance target from the shared environment field */ export declare function sampleMaterialAppearance(field: Pick, target: MaterialAppearanceTarget, baseline: MaterialAppearanceBaseline, policy?: MaterialAppearancePolicy): MaterialAppearanceResponse;