Methods
# inner gln_wfbm(v, opts) → {float}
Generates Fractional Brownian motion (fBm) from Worley Noise.
Parameters:
Name | Type | Description |
---|---|---|
v |
vec3 | Point to sample fBm at. |
opts |
gln_tFBMOpts | Options for generating Simplex Noise. |
Value of fBm at point "p".
float
Example
gln_tFBMOpts opts =
gln_tFBMOpts(1.0, 0.3, 2.0, 0.5, 1.0, 5, false, false);
gln_tWorleyOpts voronoiOpts =
gln_tWorleyOpts(1.0, 1.0, 3.0, false);
float n = gln_wfbm(position.xy, voronoiOpts, opts);
# inner gln_worley(x, opts) → {float}
Generates Voronoi Noise.
Parameters:
Name | Type | Description |
---|---|---|
x |
vec2 | Point to sample Voronoi Noise at. |
opts |
gln_tWorleyOpts | Options for generating Voronoi Noise. |
Value of Voronoi Noise at point "p".
float
Example
gln_tWorleyOpts opts = gln_tWorleyOpts(uSeed, 0.0, 0.5, false);
float n = gln_worley(position.xy, opts);
Type Definitions
struct
# gln_tWorleyOpts
Options for Voronoi Noise generators.
Properties:
Name | Type | Description |
---|---|---|
seed |
float | Seed for PRNG generation. |
distance |
float | Size of each generated cell |
scale |
float | "Zoom level" of generated noise. |
invert |
boolean | Invert generated noise. |