Parameters
Name | Type | Description |
---|---|---|
p | vec3<f32> | Input 3D vector to hash. |
Returns
WGSL Code
fn hash3D(p: vec3<f32>) -> vec3<f32> {var p3 = fract(p * vec3<f32>(0.1031, 0.1030, 0.0973));p3 += dot(p3, p3.yxz + 33.33);return fract((p3.xxy + p3.yxx) * p3.zyx) * 2.0 - 1.0;}