import type { TSLBoolNode, TSLFloatNode, TSLFunction, TSLIntNode, TSLMat4Node, TSLNode, TSLTextureNode, TSLVec3Node, TSLVec4Node } from '../types/tsl.cjs'; /** Integer 3D coordinate node consumed by the Morton/Hilbert helper. */ export type SDFIntegerCoordinateNode = TSLNode<'ivec3'>; /** Public sampler input accepted alongside a Three.js 3D texture node. */ export type SDFSamplerNode = TSLNode; /** Arguments accepted by {@link blueNoise3D}. */ export type BlueNoise3DArguments = [ position: SDFIntegerCoordinateNode, level: TSLIntNode ]; /** Arguments accepted by {@link trilinearSample}. */ export type TrilinearSampleArguments = [ sdfTexture: TSLTextureNode, sdfSampler: SDFSamplerNode, uvw: TSLVec3Node ]; /** Arguments accepted by {@link sdfGradient}. */ export type SDFGradientArguments = [ sdfTexture: TSLTextureNode, sdfSampler: SDFSamplerNode, uvw: TSLVec3Node, texelSize: TSLVec3Node ]; /** Arguments accepted by {@link worldToSDFCoords}. */ export type WorldToSDFCoordsArguments = [ worldPosition: TSLVec3Node, inverseBoundsMatrix: TSLMat4Node ]; /** Arguments accepted by {@link sdfCoordsToWorld}. */ export type SDFCoordsToWorldArguments = [ uvw: TSLVec3Node, boundsMatrix: TSLMat4Node ]; /** Arguments accepted by {@link sdfBoundaryResponse}. */ export type SDFBoundaryResponseArguments = [ position: TSLVec3Node, velocity: TSLVec3Node, sdfValue: TSLFloatNode, sdfNormal: TSLVec3Node, stiffness: TSLFloatNode, damping: TSLFloatNode ]; /** Arguments accepted by {@link isInsideSDF}. */ export type IsInsideSDFArguments = [ sdfValue: TSLFloatNode, threshold: TSLFloatNode ]; /** * 3D Blue noise generator using Hilbert curve and R1 sequence. * Produces high-quality low-discrepancy samples in 3D space. * * **Use Cases:** * - Volume sampling * - 3D dithering * - Particle distribution * - Stochastic volumetric rendering * * @function blueNoise3D * @param {Node.} p - 3D integer coordinates * @param {Node.} level - Hilbert curve recursion level (4-6 recommended) * @returns {Node.} Normalized blue noise value in [0..1] */ export declare const blueNoise3D: TSLFunction; /** * Trilinear interpolation for 3D texture sampling. * Smoothly interpolates signed distance values across voxel boundaries. * * @function trilinearSample * @param {Node} sdfTexture - 3D SDF texture (texture_3d) * @param {Node} sdfSampler - Texture sampler * @param {Node.} uvw - Normalized texture coordinates [0..1] * @returns {Node.} Interpolated SDF value */ export declare const trilinearSample: TSLFunction; /** * Computes the gradient (normal) of the SDF using central differences. * The gradient points in the direction of increasing distance (outward from surface). * * @function sdfGradient * @param {Node} sdfTexture - 3D SDF texture * @param {Node} sdfSampler - Texture sampler * @param {Node.} uvw - Normalized texture coordinates * @param {Node.} texelSize - Size of one texel in UV space (1/resolution) * @returns {Node.} Normalized gradient vector (surface normal) */ export declare const sdfGradient: TSLFunction; /** * Transforms a world-space position to SDF texture coordinates. * * @function worldToSDFCoords * @param {Node.} worldPos - World space position * @param {Node.} inverseBoundsMatrix - Inverse of SDF bounds transformation * @returns {Node.} SDF texture coordinates [0..1] */ export declare const worldToSDFCoords: TSLFunction; /** * Transforms SDF texture coordinates to world-space position. * * @function sdfCoordsToWorld * @param {Node.} uvw - SDF texture coordinates [0..1] * @param {Node.} boundsMatrix - SDF bounds transformation matrix * @returns {Node.} World space position */ export declare const sdfCoordsToWorld: TSLFunction; /** * Boundary collision response for particles against SDF volume. * Applies penalty force when particle is outside the boundary (sdf > 0). * * @function sdfBoundaryResponse * @param {Node.} position - Particle position * @param {Node.} velocity - Particle velocity * @param {Node.} sdfValue - Signed distance at particle position * @param {Node.} sdfNormal - Surface normal from SDF gradient * @param {Node.} stiffness - Boundary stiffness coefficient * @param {Node.} damping - Velocity damping factor * @returns {Node.} Updated (position.xyz, velocity.x) - use .xyz for pos, need to call again for full velocity */ export declare const sdfBoundaryResponse: TSLFunction; /** * Checks if a position is inside the SDF volume. * * @function isInsideSDF * @param {Node.} sdfValue - Signed distance value * @param {Node.} threshold - Distance threshold (typically 0.0) * @returns {Node.} True if inside volume (sdf < threshold) */ export declare const isInsideSDF: TSLFunction;