Log inGet started
Package

noise_angle.shaderModule

Newest version

This package holds more than this page lists. See all of its files in its world.

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): octaves layers, each lacunarity times finer and gain times as strong as the one before, octave i (from 0) drawn from seed + i * 7919, summed and divided by the root of the sum of the squared strengths.
  • zero_angle_gradient2_d(p, seed): the same noise and its slope, a vec3: x the value, yz the derivative along each axis of p.
  • zero_angle_fbm_damped2(p, octaves, lacunarity, gain, seed, damping): zero_angle_fbm2 with each octave's height divided by 1 + damping * |s|^2, s the slope of the octaves below it in p's units, so fine octaves fade where the coarser ones stand steep and keep their height on the flats between; a damping of 0 or less answers zero_angle_fbm2's sum.
  • zero_angle_warped2(p, warp, feature, seed): p pushed by a second noise, two 4-octave sums from seeds of their own, scaled by warp / feature noise units; a warp of 0 or less leaves p where 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); }