import type { TSLFloatInput, TSLFloatNode, TSLVec3Node } from '../types/tsl.cjs'; /** Values supplied to each raymarching callback invocation. */ export interface RaymarchingBoxStep { positionRay: TSLVec3Node; stepIndex: TSLFloatNode; rayDir: TSLVec3Node; delta: TSLFloatNode; stepAdvance: TSLFloatNode; } /** Callback invoked once per generated raymarching loop iteration. */ export type RaymarchingBoxCallback = (step: RaymarchingBoxStep) => void; /** Loop-invariant values supplied to the optional pre-loop hook. */ export interface RaymarchingBoxSetup { positionRay: TSLVec3Node; rayDir: TSLVec3Node; delta: TSLFloatNode; } /** Hook invoked once before the loop, for hoisting per-ray constants out of the march. */ export type RaymarchingBoxSetupCallback = (setup: RaymarchingBoxSetup) => void; /** * TSL function for performing raymarching in a box-area using the specified number of steps * and a callback function. * * ```js * RaymarchingBox( count, ( { positionRay, rayDir, delta } ) => { * * } ); * ``` * * @tsl * @function * @param {number|Node} steps - The number of steps for raymarching. * @param {Function|FunctionNode} callback - Receives `positionRay`, `rayDir`, `delta`, `stepAdvance`, and `stepIndex` at each step. Assign a larger `stepAdvance` to conservatively skip known-empty space. * @param {number|Node} [sampleOffset=0] - Fractional offset applied before the first sample. * @param {Function} [onBeforeLoop=null] - Invoked once with `{ positionRay, rayDir, delta }` before the loop; hoist per-ray constants here instead of recomputing them per step. * @param {number|Node|null} [maxDistance=null] - Optional maximum camera-to-sample distance in world units. The box exit is clamped before the loop, so opaque scene depth adds no per-step cost. */ export declare const RaymarchingBox: (steps: TSLFloatInput, callback: RaymarchingBoxCallback, sampleOffset?: TSLFloatInput, onBeforeLoop?: RaymarchingBoxSetupCallback | null, maxDistance?: TSLFloatInput | null) => void;