SDFFieldNodes
World-space TSL samplers bound to one generated signed-distance volume.
Import
import type { SDFFieldNodes } from "three-blocks/sdf-raymarching";
Declaration
interface SDFFieldNodes
Members
distance
distance(worldPosition: TSLVec3Node): TSLFloatNode;
Signed distance from a world position to the field surface, in world units.
normal
normal(worldPosition: TSLVec3Node): TSLVec3Node;
Outward field normal at a world position, from a tetrahedral gradient.
occlusion
occlusion(worldPosition: TSLVec3Node, surfaceNormal: TSLVec3Node, options?: SDFFieldOcclusionOptions): TSLFloatNode;
Cone-traced ambient occlusion above a world-space surface point.
shadow
shadow(worldPosition: TSLVec3Node, lightDirection: TSLVec3Node, options?: SDFFieldShadowOptions): TSLFloatNode;
Sphere-traced soft shadow from a world position toward a normalized light direction.
update
update(): void;
Refresh the bound texture and transforms after the source regenerates.
Related types
SDFFieldOcclusionOptions · SDFFieldShadowOptions