reflow_sdf
Signed Distance Field IR, primitives, operations, and WGSL code generation for Reflow's procedural rendering actors.
Most users should depend on
reflow_rtwhich re-exports this crate asreflow_rt::sdf. Direct use is appropriate when writing custom procedural-geometry actors or offline SDF tools.
What it provides
SdfNodeIR: primitives (sphere, box, cylinder, torus, tube path, puddle, …), CSG operations (union, intersect, subtract, smooth variants), transforms, material slots, scene settings.codegen::compile— emits a ready-to-use WGSL compute shader for ray marching.- Slot-dispatch support: material shaders from
reflow_shadercan plug into specific named regions of an SDF scene.
Quick glance
use ;
let scene = Scene ;
let compiled = compile;
println!;
In a Reflow graph, the SDF tree is authored by tpl_sdf_* actors, then consumed by tpl_sdf_render (ray march) or tpl_sdf_marching_cubes (mesh).
License
MIT OR Apache-2.0.