Parameters
Name | Type | Description |
---|---|---|
position | vec3<f32> | 3D position to evaluate. |
normal | vec3<f32> | Normal vector of the plane (should be normalized). |
Returns
WGSL Code
fn sdfPlane(position: vec3<f32>, normal: vec3<f32>) -> f32 {let n = normalize(normal);return dot(position, n);}