Collection of tileable procedural textures:
- value noise (with derivatives and gradient rotation)
- gradient noise (with derivatives)
- perlin noise (with gradient rotation)
- checkerboard (diagonal)
- patterns: tile weaves, cross, waves, stairs
- celullar noise (with derivatives and phase)
- metaballs (variant of cellular noise)
- voronoi (edges, cells)
- fbms (value, perlin, voronoi and derivative)
- domain warping (fbnm and gradient curl)
- hexagonal grid and noise variant
Functions: hash3D (from 1D to 4D), noise, noised and gridNoise.
Functions: gradientNoise, gradientNoised and gradientNoiseDisorder.
Functions: perlinNoise, perlinNoised and organicNoise.
Functions: cellularNoise (F1), cellularNoise (F2), metaballs and cellularNoised.
Functions: cellularNoise.
Functions: voronoi, cracks, voronoiPattern and voronoi (tile position of the cell).
Functions: noiseHexagons and noiseHexagonsd.
Functions: checkerboard, checkerboard45, randomLines and dotsNoise.
Functions: metaballs, wavePattern, stairsPattern and crossPattern.
Functions: tileWeave.
Functions: tileHexagons and tileHexagonsRadii (utility).
Functions: fbm, fbmPerlin (mode == 4u), fbmGrid and fbmMetaballs.
Functions: fbmMulti.
Functions: fbmd and fbmdPerlin.
Functions: fbmPerlin (mode: 0u, 1u, 2u, 3u).
Functions: fbmGrayscaleImaged and fbmImage.
Functions: fbmWarp and fbmPerlinWarp.
The Q and R values of the warp can be used to mix different patterns/colors:
vec2 q, r;
float f = fbmWarp(p, scale, factors, octaves, shifts, phase, gain, vec2(lacunarity), slopeness, 0.0, true, 0.0, q, r);
col = mix(vec3(0.1,0.5,0.8), vec3(0.6,0.6,0.3), clamp((f * f) * 8.0, 0.0, 1.0));
col = mix(col, vec3(0.0, 0.1, 0.05), length(q));
col = mix(col, vec3(0.8, 0.8, 0.8), r.x);
col = mix(col, col * vec3(0.8, 0.4, 0.2), 0.5 * pow(length(r), 4.0));
Functions: perlinNoiseWarp and curlWarp.
Based on:
- Filtering the checkerboard pattern by Inigo Quilez.
- Value noise derivatives by Inigo Quilez.
- Voronoi edges by Inigo Quilez.
- 2D distance functions by Inigo Quilez.
- GPU Texture-Free Noise by Brian Sharpe.
- Modifications to Classic Perlin Noise by Brian Sharpe.
- Hash Functions for GPU Rendering by Mark Jarzynski.
Bug reports and pull requests are welcome on GitHub at https://github.com/tuxalin/procedural-tileable-shaders.
The code is available as open source under the terms of the MIT License.