import { Expr, GpuComputeNode, GpuFragmentParams } from '../../gpu/contract'; export interface GatherSpec { /** The pixel, in the field's coordinates (vec2). */ origin: Expr; /** Signed distance at any point of the field's coordinates. */ field: (at: Expr) => Expr; /** Number of cones tiling the circle (compile-time: the fan is a WGSL loop of this count). */ cones: number; /** Maximum sphere-trace steps per cone. */ steps: number; /** Distance beyond which a cone has escaped. */ reach: Expr | number; /** Where along each cone the trace begins (the pixel's own distance is the natural start). */ start: Expr | number; /** Hit threshold and minimum step — about one device pixel in field units. */ surfaceEps: Expr | number; /** Per-pixel [0, 1) rotation of the fan, in cones. */ jitter: Expr | number; /** Radiance leaving the boundary toward the pixel at a cone's closest boundary point (scalar). */ emission: (hit: { point: Expr; normal: Expr; distance: Expr; coverage: Expr; }) => Expr; /** Locals the emission shares with the enclosing recipe — emitted before the loop. */ deps?: Expr[]; hint?: string; } /** Irradiance at a pixel from an emitting, occluding boundary — the coverage-weighted mean over the cone fan. */ export declare function gatherIrradiance(spec: GatherSpec): Expr; export interface ShadowSpec { /** The lit point, already stepped off the surface along its normal. */ from: Expr; /** The light position. */ toward: Expr; field: (at: Expr) => Expr; steps: number; surfaceEps: Expr | number; /** Penumbra width: how much a near-miss dims the light (0 = hard shadow). */ softness?: Expr | number; hint?: string; } /** Fraction of the light at `toward` that reaches `from` through the field (1 = unblocked). */ export declare function shadowVisibility(spec: ShadowSpec): Expr; export interface IrradianceFieldSpec { /** * The per-frame ray budget (stratified rays per texel): `burst` on the first frame after a * change (what a nudge or a still shows), `motion` while changes keep coming (motion masks the * noise), `refine` for each of `refineFrames` extra gathers folded into the running mean once * the scene is still — then the node idles. */ rays: { burst: number; motion: number; refine: number; refineFrames: number; }; /** Sphere-trace step cap per ray (default 32). */ steps?: number; /** Shadow-ray step cap; 0 compiles the shadow rays out (default 12). */ shadowSteps?: number; /** Texels per side of the square irradiance texture. */ resolution: number; /** * The light LIST prop (`listPropConfig`, `getCpuValue`-resolved so per-light mouse drivers work) * and its item field names: a `position`, a `color`, and a `number` intensity. */ lights: { prop: string; position: string; color: string; intensity: string; }; /** Prop names the gather reads (all `getCpuValue`-resolved). */ reach: string; wrap: string; lightRange: string; shadowSoftness: string; /** Key the texture is published under in `computeOutputs` (default 'irradianceTexture'). */ outputKey?: string; namePrefix?: string; } /** * The irradiance-field compute node. Returns the `compute` half for the definition and `sample`, * the fragment's bilinear read of the gathered field at the composed UV (undefined when no compute * ran — GPU-free resolve — so the recipe can fall back). */ export declare function irradianceField(spec: IrradianceFieldSpec): { compute: GpuComputeNode; sample: (params: GpuFragmentParams) => Expr | undefined; }; //# sourceMappingURL=radiance.d.ts.map