WGSL 3D SDF Primitives Revision: 06.08.2023, https://compute.toys/view/407 Sphere - exact fn sdSphere(p: vec3f, r: f32) -> f32 { return length(p) - r; }
WGSL Noise Algorithms Good and fast integer hash // https://www.pcg-random.org/ fn pcg(n: u32) -> u32 { var h = n * 747796405u + 2891336453u; h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u; return (h >> 22u) ^ h; }