Parameters
| Name | Type | Description |
|---|---|---|
| signedDistance | f32 | Signed distance field value. |
| threshold | f32 | Threshold for solid determination. |
| smoothing | f32 | Smoothing factor for anti-aliasing. |
Returns
f32value between 0.0 and 1.0.
WGSL Code
fn sdfToSmoothSolid(signedDistance: f32, threshold: f32, smoothing: f32) -> f32 {return 1.0 - smoothstep(threshold - smoothing, threshold + smoothing, signedDistance);}