import { Expr } from '../../gpu/contract'; import { SurfaceFrame, SurfaceField } from './materials'; export interface InteriorRay { /** Chord entry depth along the view (volumetric taps carry it in `.w`; flat shapes enter at 0). */ entry: Expr; /** Chord length (the shared optical-thickness reading, scaled by the material's factor). */ length: Expr; /** The in-plane interior position at chord depth `z` — origin sheared along the view. */ at(z: Expr): { x: Expr; y: Expr; }; } /** * The ray a shape's interior is sampled along: entry depth + chord length, and `at(z)` — * the position any interior content (gas samples, star planes, backdrops) lives at for a * given depth. `shear` sets how strongly deeper samples slide along the view ray's * in-plane direction (the perspective parallax of looking INTO a solid). */ export declare function interiorRay(field: SurfaceField, frame: SurfaceFrame, opts: { origin: { x: Expr; y: Expr; }; view?: Expr; shear?: number; lengthScale?: number; }): InteriorRay; /** * A content plane at a fixed depth along an interior ray, counter-panned by a rotation * sensor so it parallaxes like scenery behind a window: rotating the shape pans the * plane, deeper planes drifting further (`panRate`). */ export declare function parallaxPlane(ray: InteriorRay, opts: { depth: number; pan?: { x: Expr; y: Expr; }; panRate?: number; hint?: string; }): { x: Expr; y: Expr; z: Expr; }; /** * The house turbulence: a billowing 3D cloud density at an interior point — one-octave * domain warp (the folds) over a 3-octave fbm, drifting on `drift` and decorrelated per * axis by `seed`. Returns the composed `density` plus the raw `mid`/`fine` octaves, which * double as free detail fields (dust bands, ridge filaments) at zero extra noise cost. */ export declare function turbulentMedium(p: { x: Expr; y: Expr; z: Expr; }, opts: { frequency: Expr; drift?: Expr; seed?: Expr; billow?: Expr; hint?: string; }): { density: Expr; mid: Expr; fine: Expr; }; export interface VolumeMarchStep { /** Step index (build-time). */ i: number; /** Chord fraction at the step centre, 0..1 (build-time). */ t: number; /** Depth along the chord (entry + length·(t + jitter)), locals-bound. */ z: Expr; } /** * Front-to-back emission/absorption march: `steps` samples along the chord, each * contributing `emit · transmittance (· emissionGain)` and attenuating the transmittance * by `exp(−absorb)`. Absorption is per-channel (a vec3 `absorb` tints what lies behind — * interstellar reddening, coloured glass, murky water). The unrolled loop costs exactly * what the sample callback costs; banding is bought off with `jitter` (a per-pixel hash * offset in chord-fraction units), not more steps. * * Returns the accumulated colour and the surviving transmittance — multiply anything * BEHIND the medium (backgrounds, star planes) by the latter. */ export declare function volumeMarch(opts: { steps: number; entry: Expr; length: Expr; /** Per-pixel offset added to each step's chord fraction (banding → grain). */ jitter?: Expr; /** Per-step emission normalizer (typically `k / steps` so tiers match in brightness). */ emissionGain?: Expr; hint?: string; }, sample: (step: VolumeMarchStep) => { emit: Expr; absorb: Expr; }): { color: Expr; transmittance: Expr; }; //# sourceMappingURL=volume.d.ts.map