Builtin Library
- ..
- README.md857 B
- module.wgsl3.2 KB
README.md
noise_angle
Gradient noise over a plane whose lattice gradients are unit vectors at a hashed angle, and the fractal sum of it.
zero_angle_gradient2(p, seed): gradient noise with quintic interpolation, roughly -0.7 to 0.7.zero_angle_fbm2(p, octaves, lacunarity, gain, seed):octaveslayers, eachlacunaritytimes finer andgaintimes as strong as the one before, octavei(from 0) drawn fromseed + i * 7919, summed and divided by the root of the sum of the squared strengths.zero_angle_warped2(p, warp, feature, seed):ppushed by a second noise, two 4-octave sums from seeds of their own, scaled bywarp / featurenoise units; awarpof 0 or less leavespwhere it is.
#include "@builtin::systems.procgen.kernels.noise_angle"
fn relief(p: vec2<f32>) -> f32 { return zero_angle_fbm2(p, 6u, 2.0, 0.5, 1u); }