Parameters
Name | Type | Description |
---|---|---|
signedDistance | f32 | Signed distance field value. |
threshold | f32 | Threshold for solid determination. |
Returns
f32if solid, 0.0 if not (as f32 for compatibility).
WGSL Code
fn sdfToSolid(signedDistance: f32, threshold: f32) -> f32 {return select(0.0, 1.0, signedDistance <= threshold);}