Blending COPernicus 2D SDFs into a three-dimensional volume using a Boolean Intersections function.
float blend = chf('blend');
function float sintersect(float d1, d2, k){
float h = clamp(0.5 - 0.5 * (d2 - d1) / k, 0.0, 1.0);
return lerp(d2, d1, h) + k * h * (1.0 - h);
}
float d_0 = volumesample(1, 0, v@P);
float d_1 = volumesample(1, 1, v@P);
f@d = sintersect(d_0, d_1, blend);