Wow! Are their really this many types of noise function? YES! In fact, their are more! These are the 50 popular ones that you might come across in the literature and on your travels - however, in reality - noise functions is like nature - it has no limits to its creativity and diversity.
Below you'll find a complete list of noise functions - include an implementation example in WGSL (WebGPU Shader Language) - so you can give each one a try if you want.
A cool thing about noise functions is - they can be combined and connected together in all sorts of ways to create mutants and variations! You can also tinker with the constants, or add in a few extra parameters/functions to make the noise suddenly change and become a new type of noise.
The example functions have been provided for 2d noise samples - using a 2d seed - so they can be used for generating texture patterns! Just because I think it's nice to see what the noise looks like.
The following shows the noise functions using the base noise function
random(..)
as the input when it depends on a noise input.
Modify the noise functions - so their base noise input is a smoothed noise function. This creates the following outputs:
1. Simple Random Noise
Generates pseudorandom values based on the input coordinates.
A simplified version of simplex noise for smooth textures.
fn simplexNoise(uv: vec2<f32>) -> f32 { let s = (uv.x + uv.y) * 0.5; let skewed = vec2<f32>(floor(uv.x + s), floor(uv.y + s)); let t = (skewed.x + skewed.y) * 0.36602540378; let unskewed = uv - skewed + t; return random(unskewed); }
10. Value Noise
Generates noise by interpolating random values across a grid.
fn valueNoise(uv: vec2<f32>) -> f32 { let i = floor(uv); let f = fract(uv); return mix(mix(random(i), random(i + vec2<f32>(1.0, 0.0)), f.x), mix(random(i + vec2<f32>(0.0, 1.0)), random(i + vec2<f32>(1.0, 1.0)), f.x), f.y); }
11. Fractal Brownian Motion (FBM)
Combines multiple layers of noise at varying frequencies and amplitudes for rich textures.
fn fbm(uv: vec2<f32>) -> f32 { var value = 0.0; var amplitude = 0.5; var frequency = 1.0; for (var i: i32 = 0; i < 5; i = i + 1) { value += amplitude * random(uv * frequency); frequency *= 2.0; amplitude *= 0.5; } return value; }
12. Turbulence
Uses the absolute value of FBM to generate textures resembling turbulent flows. While FBM noise combines multiple layers of noise (often with fractional brownian motion) to generate smooth, continuous patterns with both positive and negative values; however, turbulence noise uses absolute values of noise to create chaotic patterns, typically with no smoothing and non-negative values.
fn turbulence(uv: vec2<f32>) -> f32 { var value: f32 = 0.0; var frequency: f32 = 1.0; var amplitude: f32 = 1.0;
for (var i: i32 = 0; i < 5; i = i + 1) { value += abs(random(uv * frequency)) * amplitude; frequency *= 2.0; amplitude *= 0.5; }
return value; }
13. Worley Noise
Generates a cellular effect based on the distance to the nearest feature point.
fn worleyNoise(uv: vec2<f32>) -> f32 { var minDist: f32 = 1e9; var featurePoint: vec2<f32>;
// Generate feature points and calculate distance for (var i: i32 = -1; i <= 1; i = i + 1) { for (var j: i32 = -1; j <= 1; j = j + 1) { featurePoint = floor(uv) + vec2<f32>(f32(i), f32(j)) + fract(sin(vec2<f32>(dot(floor(uv) + vec2<f32>(f32(i), f32(j)), vec2<f32>(12.9898, 78.233))) * 43758.5453)); var dist: f32 = length(uv - featurePoint); if (dist < minDist) { minDist = dist; } } } return minDist; }
Produces repeating polygons like triangles or hexagons.
fn polygonalGridNoise(uv: vec2<f32>, sides: f32) -> f32 { // Scale UV to ensure uniform size of polygons let scaledUV = uv * sides;
// Compute the angle and map it into polygonal segments let angle = atan2(scaledUV.y, scaledUV.x) + 3.14159; let segment = floor(angle / (6.28318 / sides));
// Compute randomness based on segment and grid position return fract(segment + random(floor(scaledUV))); }
39. Angular Gradient Noise
Uses the angle of UV coordinates to create gradients.