Improved Perlin Noise
Perlin's revision of gradient noise: a quintic fade curve with continuous second derivative and gradients drawn from the 12 cube-edge directions, removing the creases and directional bias of the 1985 version.
Also known as Perlin 2002
In the family Procedural generation, noise functions
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | Official add-on | import { ImprovedNoise } from 'three/addons/math/ImprovedNoise.js' docs |
| Babylon.js 9.38.0 | Official add-on | @babylonjs/procedural-textures PerlinNoiseProceduralTexture (and core NoiseProceduralTexture perlinNoise2D) docs |
| Godot 4.7 | Built in | FastNoiseLite.noise_type = FastNoiseLite.TYPE_PERLIN docs |
| Unity | Official add-on | Package Manager > Mathematics > noise.cnoise / noise.pnoise docs Unity.Mathematics classic Perlin noise (Gustavson). |
| Unreal 5.7 | Built in | Material graph: Noise expression > Function = Gradient / Perlin (NoiseFunction) docs |
| Blender 5.2 | Built in | Shader / Geometry node: Noise Texture (Perlin / Multifractal / fBM) docs |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Structure is the same as classic gradient noise (hash lattice corners, dot offset with gradient, interpolate), with two changes. First, the interpolation weight becomes the quintic 6t^5-15t^4+10t^3, whose first and second derivatives vanish at cell boundaries, so the field is C2 continuous and its analytic derivatives have no seams. Second, instead of random unit vectors the gradient set is limited to the twelve vectors from the cube centre to edge midpoints, selected with a few bit operations from the hash. This avoids long axis-aligned gradients that caused visible streaks and makes the gradient dot product a sum of at most two terms. The reference Java code is a short permutation-table implementation that is trivially ported to shaders, usually replacing the table with an arithmetic hash.
When to choose it
Reach for it when
- noise shows creases or axis-aligned artifacts
- need smooth derivatives for lighting or bump
- noise gradient has visible discontinuities
- want analytic slope for erosion terrain
Choose it as the default gradient noise whenever you light, bump or differentiate the result, or when you need analytic derivatives for erosion-style terrain. Prefer Simplex Noise when you need 4D or want cheaper high-dimensional evaluation, and Perlin Noise (gradient lattice noise) only when reproducing legacy 1985 output exactly. If you need cell structure rather than smooth blobs use Worley (Cellular) Noise.
Field marks
- Still lattice-aligned at low frequency, producing faint grid-oriented banding that fBm with rotated octaves hides but does not remove
- Integer-hash quality matters: weak hashes show repeating patterns or correlated rows far from the origin
- Float precision loss at large coordinates makes the noise collapse into stripes or blocks
- Not tileable without wrapping the lattice hash, a common surprise when baking seamless textures
Presets
Lit gradient noise: cubic fade creases (left) vs improved quintic fade (right)
{
"SCALE": 7
}Show GLSL (33 lines)
// Gradient noise lit as a height field: left uses Perlin's old cubic fade (grid creases visible), right the improved quintic fade.
const float SCALE = 7.0;
vec2 grad(vec2 i) {
// 8 edge-ish directions chosen by a lattice hash
float h = fract(sin(dot(i, vec2(127.1, 311.7))) * 43758.5453);
float a = floor(h * 8.0) * 0.7853982;
return vec2(cos(a), sin(a));
}
float noise(vec2 p, bool quintic) {
vec2 i = floor(p), f = fract(p);
vec2 u = quintic ? f * f * f * (f * (f * 6.0 - 15.0) + 10.0) : f * f * (3.0 - 2.0 * f);
float a = dot(grad(i), f);
float b = dot(grad(i + vec2(1, 0)), f - vec2(1, 0));
float c = dot(grad(i + vec2(0, 1)), f - vec2(0, 1));
float d = dot(grad(i + vec2(1, 1)), f - vec2(1, 1));
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
bool q = uv.x > 0.5;
vec2 p = uv * SCALE + vec2(iTime * 0.0);
float e = 0.01;
float h = noise(p, q);
float hx = noise(p + vec2(e, 0), q) - noise(p - vec2(e, 0), q);
float hy = noise(p + vec2(0, e), q) - noise(p - vec2(0, e), q);
vec3 n = normalize(vec3(-hx * 12.0, -hy * 12.0, 1.0));
float dif = max(dot(n, normalize(vec3(-0.5, 0.6, 0.7))), 0.0);
float spec = pow(max(dot(reflect(-normalize(vec3(-0.5, 0.6, 0.7)), n), vec3(0, 0, 1)), 0.0), 24.0);
vec3 col = mix(vec3(0.15, 0.2, 0.35), vec3(0.95, 0.8, 0.6), h * 1.2 + 0.5) * (0.25 + 0.8 * dif) + 0.3 * spec;
col = mix(col, vec3(1.0), smoothstep(0.004, 0.0, abs(uv.x - 0.5)));
fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| improved-perlin-noise-specimen | Tesla T4 1920x1080 | 9.17× baseline (moderate) · 0.302 ms / 0.319 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| improved-perlin-noise-specimen | NVIDIA L4 1920x1080 | 8.98× baseline (moderate) · 0.143 ms / 0.147 ms · 2.1× faster on L4 | opengl-timer-query · Cross-architecture validation |
| improved-perlin-noise-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 6.81× baseline (moderate) · 0.196 ms / 0.196 ms · 1.5× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): cited by Histogram-preserving blending (stochastic texturing), Interactive watercolor rendering with temporal coherence.
Sources
- primaryKen Perlin (2002). Improving noise. Proceedings of the 29th annual conference on Computer graphics and interactive techniques.Verified via crossref · 2026-11-29doi:10.1145/566570.566636
- tutorialPatricio Gonzalez Vivo. The Book of Shaders: Noise. thebookofshaders.com.Verified via live page · 2026-11-29
- tutorialInigo Quilez. Gradient Noise - Derivatives. iquilezles.org.Verified via live page · 2026-11-29