GLSL

Perlin

Voronoi Noise provider.

Methods

# inner gln_perlin(p) → {float}

Generates 2D Perlin Noise.
Parameters:
Name Type Description
p vec2 Point to sample Perlin Noise at.
Value of Perlin Noise at point "p".
float
Example
float n = gln_perlin(position.xy);

# inner gln_perlin(p) → {float}

Generates 3D Perlin Noise.
Parameters:
Name Type Description
p vec3 Point to sample Perlin Noise at.
Value of Perlin Noise at point "p".
float
Example
float n = gln_perlin(position.xyz);

# inner gln_pfbm(p, opts) → {float}

Generates 2D Fractional Brownian motion (fBm) from Perlin Noise.
Parameters:
Name Type Description
p vec2 Point to sample fBm at.
opts gln_tFBMOpts Options for generating Perlin Noise.
Value of fBm at point "p".
float
Example
gln_tFBMOpts opts =
     gln_tFBMOpts(uSeed, 0.3, 2.0, 0.5, 1.0, 5, false, false);

float n = gln_pfbm(position.xy, opts);

# inner gln_pfbm(p, opts) → {float}

Generates 3D Fractional Brownian motion (fBm) from Perlin Noise.
Parameters:
Name Type Description
p vec3 Point to sample fBm at.
opts gln_tFBMOpts Options for generating Perlin Noise.
Value of fBm at point "p".
float
Example
gln_tFBMOpts opts =
     gln_tFBMOpts(uSeed, 0.3, 2.0, 0.5, 1.0, 5, false, false);

float n = gln_pfbm(position.xy, opts);