UNPKG

@thi.ng/shader-ast-stdlib

Version:

Function collection for modular GPGPU / shader programming with @thi.ng/shader-ast

20 lines 834 B
import type { RaymarchOpts, RaymarchScene } from "../api.js"; /** * Higher order function producing a function to perform a raymarch * using the provided `scene` function and options to configure the * raymarch process itself. * * Returns an AST function which takes 2 args: ray origin, normalized * ray direction and returning a 2D vector of: * * - x = the signed distance to the `scene` defined SDF surface * - y = user data provided by `scene` (e.g. material ID) * * The `scene` function itself takes a 3D point as input and returns a * vec2 with the same component meaning as above. * * @param scene - * @param _opts - */ export declare const raymarchScene: (scene: RaymarchScene, _opts?: Partial<RaymarchOpts>) => import("@thi.ng/shader-ast").TaggedFn2<"vec3", "vec3", "vec2">; //# sourceMappingURL=scene.d.ts.map