Table of Contents

Class

Provides high-entropy stateless deterministic noise using a ChaCha-inspired mixing function.

[BurstCompile]
public static class SquirrelNoise64Bit
Inheritance
object

Fields

DefaultNoiseType

A constant that defines the default noise type used in the SquirrelNoise64Bit methods. The default value is set to MangledBitsBalancedMix.

private const NoiseType DefaultNoiseType = MangledBitsBalancedMix

Field Value

NoiseType

Methods

Billow(float3, ulong, int, float, float, float, float, bool, NoiseType)

Generates a 3D Billow noise value by using a series of octaves and applying transformations to create a smooth, continuous noise pattern. This function allows customization of frequency, amplitude, lacunarity, gain, and noise type, and can optionally normalize the result.

public static float Billow(float3 p, ulong seed = 0, int octaves = 5, float frequency = 1, float amplitude = 1, float lacunarity = 2, float gain = 0.5, bool normalize = true, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D position input as a float3 vector.

seed ulong

An optional seed value to initialize noise generation. Default is 0.

octaves int

The number of noise layers or octaves to combine. Default is 5.

frequency float

The base frequency of the noise. Default is 1.

amplitude float

The base amplitude of the noise. Default is 1.

lacunarity float

The frequency multiplier for each successive octave. Default is 2.

gain float

The amplitude multiplier for each successive octave. Default is 0.5.

normalize bool

Determines whether to normalize the output to the range [-1, 1]. Default is true.

type NoiseType

The type of noise algorithm to use. Default is MangledBitsBalancedMix.

Returns

float

A float value representing the computed Billow noise, optionally normalized to the range [-1, 1].

Cellular2D(float2, ulong, float, float, CellularDistance, NoiseType)

Computes 2D cellular noise based on the input position, seed, frequency, and other custom parameters. This method evaluates the shortest and second shortest distances from the input position to the feature points within the cellular grid, returning the computed values along with additional information about the closest feature point and grid cell.

public static HashBasedNoiseUtils.Cellular2DResult Cellular2D(float2 p, ulong seed = 0, float frequency = 1, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The input 2D position as a float2 value, representing the point in space where the cellular noise is evaluated.

seed ulong

An optional unsigned 64-bit integer used to initialize the random number generator for noise computation, adding determinism and variability to the output.

frequency float

The scaling factor applied to the input position, controlling the density of features within the cellular grid. Default is 1.

jitter float

The displacement factor ranging from 0 to 1, which determines how much feature points are offset from their grid positions. Higher values result in more irregular patterns. Default is 1.

metric HashBasedNoiseUtils.CellularDistance

Specifies the distance metric used for computing distances between the input position and feature points (e.g., Euclidean, Manhattan, or Chebyshev). Default is Euclidean.

type NoiseType

Defines the noise type, determining the underlying hash algorithm and the approach for mixing values. Default is the framework's default noise type.

Returns

HashBasedNoiseUtils.Cellular2DResult

An instance of the Cellular2DResult struct, containing the shortest distance, second shortest distance, closest feature point's position, and grid cell coordinates of the closest feature point.

Cellular3D(float3, ulong, float, float, CellularDistance, NoiseType)

Generates cellular noise in 3D space using the specified position, seed, frequency, and noise parameters.

public static HashBasedNoiseUtils.Cellular3DResult Cellular3D(float3 p, ulong seed = 0, float frequency = 1, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D position at which to evaluate the cellular noise.

seed ulong

A 64-bit unsigned integer seed used to introduce variability in the generated noise.

frequency float

The frequency of the noise, determining its scale or repetition. Higher values result in finer details.

jitter float

The amount of randomness applied to the base cell locations, affecting the “jitteriness” of the pattern.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute cellular distances between feature points (e.g., Euclidean, Manhattan).

type NoiseType

The noise generation type that specifies the algorithm for mixing and producing noise results.

Returns

HashBasedNoiseUtils.Cellular3DResult

An object containing information about the first and second closest distances to feature points, as well as the corresponding cell position and feature point location.

CellularEdge01(float2, ulong, float, float, CellularDistance, float, NoiseType)

Computes a value representing a cellular noise effect with a smooth edge transition between different cells, normalized to the range [0, 1].

public static float CellularEdge01(float2 p, ulong seed = 0, float frequency = 0.005, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float edgeWidth = 0.1, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D position at which to evaluate the cellular noise.

seed ulong

A 64-bit unsigned integer seed to add randomness to the noise generation.

frequency float

The frequency of the noise, controlling the scale and spacing of cells.

jitter float

The amount of positional variation applied to the cell points, influencing the randomness of cell shapes.

metric HashBasedNoiseUtils.CellularDistance

The distance calculation method used to evaluate the proximity between cell points, such as Euclidean or Manhattan.

edgeWidth float

The width of the transition area between different cells, affecting the sharpness of the edges.

type NoiseType

The noise generation type, specifying the underlying algorithm for computing noise values.

Returns

float

A floating-point value normalized to the range [0, 1], representing the computed cellular edge noise at the given position.

CellularEdge01(float3, ulong, float, float, CellularDistance, float, NoiseType)

Computes a smooth noise value representing a cellular pattern with a customizable edge effect, based on the provided position, seed, frequency, jitter, and edge parameters.

public static float CellularEdge01(float3 p, ulong seed = 0, float frequency = 0.006, float jitter = 0.9, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float edgeWidth = 0.12, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The input 3D position in space used to sample the noise value.

seed ulong

A 64-bit unsigned integer that introduces randomness to the generated noise. Defaults to 0.

frequency float

A scalar value that scales the frequency of the cellular noise pattern. Higher values create more detailed patterns. Defaults to 0.006.

jitter float

A factor controlling the randomness or displacement of cell centers. Higher values lead to more jittered patterns. Defaults to 0.9.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute the cellular noise. Defaults to Euclidean.

edgeWidth float

The width of the transition between cell edges and their interiors. Smaller values create sharper edges. Defaults to 0.12.

type NoiseType

The noise generation type, specifying the algorithm or mixing strategy for noise computation. Defaults to MangledBitsBalancedMix.

Returns

float

A floating-point value in the range [0, 1] representing the computed cellular noise with the specified edge effect applied.

CellularEdgeExp01(float2, ulong, float, float, CellularDistance, float, NoiseType)

Computes a value based on cellular noise and transforms it using an exponential decay function, providing a smoothly blended result between cellular distances.

public static float CellularEdgeExp01(float2 p, ulong seed = 0, float frequency = 0.005, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float k = 8, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D coordinate used to calculate the cellular noise at a specific position in space.

seed ulong

A seed value used to introduce randomness to the cellular noise calculation. Defaults to 0.

frequency float

The frequency of the cellular noise, determining the scale of features. Defaults to 0.005.

jitter float

The jitter factor controlling the variability in cell placements within the noise grid. Defaults to 1.0.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute cell boundaries, such as Euclidean, Manhattan, or Chebyshev. Defaults to Euclidean.

k float

A sharpness factor for the exponential decay applied to the cellular noise result. Defaults to 8.0.

type NoiseType

The noise generation type defining the mixing and hashing algorithm for the noise computation. Defaults to MangledBitsBalancedMix.

Returns

float

A float value in the range [0, 1] representing the transformed cellular noise result, biased by the exponential function.

CellularEdgeExp01(float3, ulong, float, float, CellularDistance, float, NoiseType)

Computes a non-linear cellular noise value in a clamped range of [0, 1], using an exponential vein contrast effect based on the input position and parameters.

public static float CellularEdgeExp01(float3 p, ulong seed = 0, float frequency = 0.006, float jitter = 0.9, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float k = 8, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D position vector used as input for the cellular noise computation.

seed ulong

A 64-bit unsigned integer that introduces randomness into the noise calculation. Defaults to 0.

frequency float

The frequency of the noise, scaling the input space. Defaults to 0.006f.

jitter float

A value controlling the irregularity in the distance calculation of cellular features. Defaults to 0.9f.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute cellular noise features, such as Euclidean, Manhattan, or Chebyshev. Defaults to CellularDistance.Euclidean.

k float

A scalar influencing the exponential contrast of the cellular vein effect. Higher values sharpen the contrast. Defaults to 8f.

type NoiseType

The noise generation method to determine the mixing algorithm for noise computation. Defaults to NoiseType.MangledBitsBalancedMix.

Returns

float

A clamped noise value in the range [0, 1] with non-linear vein structures based on the input parameters.

CellularEdgeSigned(float2, ulong, float, float, CellularDistance, float, NoiseType)

Computes a signed cellular edge noise value in the range [-1, 1] for a given 2D point, based on the provided parameters such as seed, frequency, jitter, distance metric, edge width, and noise type.

public static float CellularEdgeSigned(float2 p, ulong seed = 0, float frequency = 0.005, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float edgeWidth = 0.1, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D input point for which the noise value is computed.

seed ulong

An optional 64-bit unsigned integer seed value used to introduce randomness into the noise computation.

frequency float

A scaling factor that determines the frequency of the noise pattern. Higher values result in more dense patterns.

jitter float

The amount of randomness applied to cell points for noise generation. Higher values create more irregular patterns.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to calculate distances between points for cellular noise. Options include Euclidean, Manhattan, and Chebyshev.

edgeWidth float

The normalized width of the cellular edges, controlling the transition area between cells.

type NoiseType

The noise generation algorithm type, determining how input values are processed and mixed to produce the noise.

Returns

float

A signed floating-point value in the range [-1, 1] representing the computed cellular edge noise for the given 2D point.

CellularEdgeSigned(float3, ulong, float, float, CellularDistance, float, NoiseType)

Computes a signed cellular edge noise value based on the given 3D position, seed, frequency, jitter, distance metric, edge width, and noise generation type. The result is remapped to the range [-1, 1].

public static float CellularEdgeSigned(float3 p, ulong seed = 0, float frequency = 0.006, float jitter = 0.9, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float edgeWidth = 0.12, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D point for which the cellular edge noise should be computed.

seed ulong

A 64-bit unsigned integer that adds randomness to the noise computation. Defaults to 0.

frequency float

Controls the frequency of the noise. Higher values result in more granular noise variation. Defaults to 0.006.

jitter float

Adjusts the randomness of the cell point distribution. Higher values increase irregularity. Defaults to 0.9.

metric HashBasedNoiseUtils.CellularDistance

Specifies the distance metric used for calculating cellular distances (e.g., Euclidean, Manhattan, Chebyshev). Defaults to Euclidean.

edgeWidth float

Determines the blend width at the edges of cells. Smaller values create sharper edges. Defaults to 0.12.

type NoiseType

Specifies the noise generation type, which determines the method and mixing algorithm used. Defaults to MangledBitsBalancedMix.

Returns

float

A signed floating-point noise value in the range [-1, 1] derived from cellular edge computation.

CellularF1(float2, ulong, float, float, CellularDistance, NoiseType)

Computes the F1 value for cellular noise at a given 2D point. The F1 value represents the distance to the nearest feature point, offering a basis for cellular noise generation. Convenience: return F1 only.

public static float CellularF1(float2 p, ulong seed = 0, float frequency = 1, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D point for which the F1 noise value is computed.

seed ulong

The seed value for generating deterministic noise results.

frequency float

The frequency at which the noise is sampled, affecting the size of the cells.

jitter float

The amount of jitter applied to feature point positions within the cells.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute feature point distances, such as Euclidean or Manhattan.

type NoiseType

The type of noise used for hashing and mixing values, e.g., Mangled Bits or ChaCha variants.

Returns

float

The F1 value, representing the distance to the nearest feature point from the input point.

CellularF2MinusF1(float2, ulong, float, float, CellularDistance, NoiseType)

Computes the difference between the second and first closest distances (F2 - F1) for a 2D cellular noise function at a given point. Convenience: classic “cell edges”: F2 - F1.

public static float CellularF2MinusF1(float2 p, ulong seed = 0, float frequency = 1, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D point at which the cellular noise function is evaluated.

seed ulong

The seed value used for the noise calculation. Defaults to 0.

frequency float

The frequency factor applied to the noise function. Defaults to 1f.

jitter float

The amount of jitter applied to cell positions. Defaults to 1f.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to calculate noise. Defaults to Euclidean.

type NoiseType

The noise type used for hashing. Defaults to MangledBitsBalancedMix.

Returns

float

The difference between the second and first closest distances (F2 - F1) in the cellular noise result.

CellularFill01(float2, ulong, float, float, CellularDistance, NoiseType)

Computes a value between 0 and 1 based on cellular noise, given a 2D position, seed, frequency, jitter, distance metric, and noise type. Normalized F1 fill in [0,1] (2D)

public static float CellularFill01(float2 p, ulong seed = 0, float frequency = 1, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D position point where the cellular noise is sampled.

seed ulong

An optional 64-bit seed for randomness to diversify noise generation.

frequency float

The frequency of the noise, adjusting the scale of the generated pattern.

jitter float

The degree of irregularity added to the noise cell boundaries for variation.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used for calculating cellular distances, influencing the noise structure.

type NoiseType

The noise generation type, determining the algorithm used for mixing noise values.

Returns

float

A floating-point value normalized between 0 and 1, representing the result of cellular noise computation.

CellularFill01(float3, ulong, float, float, CellularDistance, NoiseType)

Computes a 0-1 normalized cellular noise pattern at a specific 3D point based on the provided seed, frequency, jitter, distance metric, and noise generation type. Normalized F1 fill in [0,1] (3D)

public static float CellularFill01(float3 p, ulong seed = 0, float frequency = 1, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D point at which the cellular noise is computed.

seed ulong

A 64-bit unsigned integer seed value that introduces randomness into the pattern.

frequency float

The frequency of the noise, which alters the scale and detail of the pattern. Higher values produce finer details.

jitter float

The degree of irregularity or randomness in the cellular noise's grid cells. Ranges between 0 (no jitter) and 1 (maximum jitter).

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute cellular distances, such as Euclidean, Manhattan, or Chebyshev.

type NoiseType

The noise generation type, controlling the underlying computation method for the noise values.

Returns

float

A floating-point value between 0 and 1 representing the normalized cellular noise result at the given 3D point.

DomainWarp(float3, ulong, float, float, int, float, float, int, float, float, float, NoiseType)

Applies domain warping to a position in 3D space using fractal Brownian motion (FBm) as the primary technique, resulting in a distorted yet consistent noise value.

public static float DomainWarp(float3 p, ulong seed = 0, float warpAmplitude = 1, float warpFrequency = 0.5, int warpOctaves = 1, float warpLacunarity = 2, float warpGain = 0.5, int valueOctaves = 5, float valueFrequency = 1, float valueGain = 0.5, float valueLacunarity = 2, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The input 3D position to be warped, represented as a float3 structure.

seed ulong

An optional 64-bit unsigned integer seed used to randomize the noise generation process. Default is 0.

warpAmplitude float

The amplitude of the warp, which controls the intensity of the distortion. Default is 1f.

warpFrequency float

The frequency of the domain warp, influencing the granularity of the warp. Default is 0.5f.

warpOctaves int

The number of warp octaves, which controls the layering of warp detail. Default is 1.

warpLacunarity float

The lacunarity scaling factor between warp octaves. Higher values increase the frequency of each sequential octave. Default is 2f.

warpGain float

The gain factor that controls the contribution of each subsequent warp octave to the overall warp effect. Default is 0.5f.

valueOctaves int

The number of octaves used for the evaluation of the warped position, which affects noise detail. Default is 5.

valueFrequency float

The frequency used in evaluating the final noise value at the warped position. Default is 1f.

valueGain float

The gain factor for the evaluation of noise value octaves. It influences the amplitude of subsequent octaves. Default is 0.5f.

valueLacunarity float

The lacunarity scaling factor for the evaluation of noise value octaves. Default is 2f.

type NoiseType

The noise generation type, which determines the algorithm used for noise computation. Default is MangledBitsBalancedMix.

Returns

float

A single-precision floating-point value representing the computed noise at the warped 3D position.

FBm(float3, ulong, int, float, float, float, float, bool, NoiseType)

Generates a fractal Brownian motion (fBm) value using noise functions and specified parameters. Combines multiple octaves of noise to produce a fractal-like effect, with adjustable frequency, amplitude, and other properties.

public static float FBm(float3 p, ulong seed = 0, int octaves = 5, float frequency = 1, float amplitude = 1, float lacunarity = 2, float gain = 0.5, bool normalize = true, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D position at which the noise should be evaluated.

seed ulong

A seed value used for noise generation to ensure repeatability.

octaves int

The number of noise layers (octaves) to combine. Higher values create more detail.

frequency float

The base frequency of the noise function. Higher values increase the noise frequency.

amplitude float

The initial amplitude of the noise. Determines the range of values for the first octave.

lacunarity float

The rate of frequency change between octaves. Defaults to 2, doubling the frequency per octave.

gain float

The rate of amplitude change between octaves. Defaults to 0.5, halving the amplitude per octave.

normalize bool

Specifies whether the result should be normalized based on the amplitude sum of all octaves.

type NoiseType

The type of noise function to use for generating noise values.

Returns

float

A floating-point value representing the fBm noise at the given position. Normalized to ~[-1,1] when normalize is true.

Get1DNoise(ulong, ulong, NoiseType)

Computes a 1D noise value as a 32-bit unsigned integer based on the given index, seed, and noise generation algorithm type.

public static uint Get1DNoise(ulong index, ulong seed, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

index ulong

The input index used to determine the specific noise value computation.

seed ulong

A 64-bit unsigned integer used as a seed for generating deterministic noise.

type NoiseType

The noise generation type, specified by the NoiseType enumeration, which determines the algorithm and mixing strategy employed during computation.

Returns

uint

A 32-bit unsigned integer representing the computed 1D noise value.

Get1DNoise01(ulong, ulong, NoiseType)

Generates a 1D noise value normalized to the range [0, 1].

public static float Get1DNoise01(ulong index, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

index ulong

The index used to compute the noise value.

seed ulong

The seed value for randomization, defaulting to 0 if not provided.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A single-precision floating-point noise value in the range [0, 1].

Get1DNoiseNeg1To1(ulong, ulong, NoiseType)

Generates a 1D noise value normalized to the range of -1 to 1.

public static float Get1DNoiseNeg1To1(ulong index, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

index ulong

The index used to calculate the noise value.

seed ulong

The seed value for ensuring deterministic noise generation.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A floating-point noise value in the range of -1 to 1.

Get2DNoise(ulong, ulong, ulong, NoiseType)

Generates a 2D noise value based on the given x and y coordinates and an optional seed using a deterministic algorithm.

public static uint Get2DNoise(ulong x, ulong y, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate of the point for which to generate 2D noise.

y ulong

The y-coordinate of the point for which to generate 2D noise.

seed ulong

An optional seed value to modify the noise output. Defaults to 0.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

uint

A 32-bit unsigned integer representing the generated 2D noise value.

Get2DNoise01(ulong, ulong, ulong, NoiseType)

Generates a 2D procedural noise value normalized to the range [0, 1].

public static float Get2DNoise01(ulong x, ulong y, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate of the input position.

y ulong

The y-coordinate of the input position.

seed ulong

A value used to seed the noise generation process, defaulting to 0.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A float value representing the 2D noise, normalized to the range [0, 1].

Get2DNoiseNeg1To1(ulong, ulong, ulong, NoiseType)

Generates a 2D noise value within the range [-1, 1] based on the provided coordinates and seed.

public static float Get2DNoiseNeg1To1(ulong x, ulong y, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate used for the noise generation.

y ulong

The y-coordinate used for the noise generation.

seed ulong

An optional seed value for the noise function. Defaults to 0.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A floating-point noise value in the range [-1, 1].

Get3DNoise(ulong, ulong, ulong, ulong, NoiseType)

Generates a pseudo-random 3D noise value based on the specified coordinates and seed.

public static uint Get3DNoise(ulong x, ulong y, ulong z, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The X-coordinate for the 3D noise.

y ulong

The Y-coordinate for the 3D noise.

z ulong

The Z-coordinate for the 3D noise.

seed ulong

An optional seed value to influence the noise generation.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

uint

A pseudo-random 3D noise value as a 32-bit unsigned integer.

Get3DNoise01(ulong, ulong, ulong, ulong, NoiseType)

Generates a 3D noise value mapped to the range [0, 1].

public static float Get3DNoise01(ulong x, ulong y, ulong z, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate of the 3D point.

y ulong

The y-coordinate of the 3D point.

z ulong

The z-coordinate of the 3D point.

seed ulong

An optional seed value for noise generation. Default is 0.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A pseudo-random noise value in the range [0, 1].

Get3DNoiseNeg1To1(ulong, ulong, ulong, ulong, NoiseType)

Generates 3D noise in the range of -1 to 1 based on x, y, z coordinates and a seed value.

public static float Get3DNoiseNeg1To1(ulong x, ulong y, ulong z, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate of the noise point.

y ulong

The y-coordinate of the noise point.

z ulong

The z-coordinate of the noise point.

seed ulong

An optional seed value to initialize the noise generation, defaulting to 0.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A floating-point noise value in the range of -1 to 1.

Get4DNoise(ulong, ulong, ulong, ulong, ulong, NoiseType)

Generates a pseudo-random 4D noise value based on the specified coordinates and seed.

public static uint Get4DNoise(ulong x, ulong y, ulong z, ulong w, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate.

y ulong

The y-coordinate.

z ulong

The z-coordinate.

w ulong

The w-coordinate.

seed ulong

The seed used to initialize the noise generation. Default is 0.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

uint

A 32-bit unsigned integer representing the generated 4D noise value.

Get4DNoise01(ulong, ulong, ulong, ulong, ulong, NoiseType)

Generates 4D noise as a float value in the range [0, 1].

public static float Get4DNoise01(ulong x, ulong y, ulong z, ulong w, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate of the 4D noise.

y ulong

The y-coordinate of the 4D noise.

z ulong

The z-coordinate of the 4D noise.

w ulong

The w-coordinate of the 4D noise.

seed ulong

The seed value used for randomizing the noise generation. Defaults to 0 if not specified.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A float value representing the 4D noise in the range [0, 1].

Get4DNoiseNeg1To1(ulong, ulong, ulong, ulong, ulong, NoiseType)

Generates a 4D noise value mapped to the range [-1, 1].

public static float Get4DNoiseNeg1To1(ulong x, ulong y, ulong z, ulong w, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x ulong

The x-coordinate in the 4D space.

y ulong

The y-coordinate in the 4D space.

z ulong

The z-coordinate in the 4D space.

w ulong

The w-coordinate in the 4D space.

seed ulong

The seed value to control the noise generation.

type NoiseType

The type of noise algorithm to apply, defined by the NoiseType enumeration.

Returns

float

A floating-point noise value in the range [-1, 1].

GetCellSeed2D(int2, ulong, NoiseType)

Generates a 64-bit hash-based seed for a specified 2D cell coordinate using a given world seed and noise generation type.

public static ulong GetCellSeed2D(int2 cell, ulong worldSeed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

cell int2

The 2D cell coordinate specified as an int2 structure, which determines the location for seed generation.

worldSeed ulong

An optional 64-bit unsigned integer used to introduce additional randomness into the generated seed. Defaults to 0 if not specified.

type NoiseType

Specifies the noise generation algorithm used to compute the seed, defaulting to MangledBitsBalancedMix.

Returns

ulong

Returns a 64-bit unsigned integer representing the computed seed value for the specified 2D cell.

GetCellSeed3D(int3, ulong, NoiseType)

Computes a 64-bit noise value specific to a 3D cell location, based on the provided cell coordinates, world seed, and noise generation type.

public static ulong GetCellSeed3D(int3 cell, ulong worldSeed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

cell int3

The 3D cell coordinates represented as an int3 structure, specifying the x, y, and z positions.

worldSeed ulong

A 64-bit unsigned integer seed applied to add randomness to the noise generation. Default is 0.

type NoiseType

The noise generation type that determines the algorithm and mixing used for computation. Default is MangledBitsBalancedMix.

Returns

ulong

A 64-bit unsigned integer representing the computed noise for the specified 3D cell.

GetUInt128(ulong, ulong, NoiseType)

Computes a 128-bit unsigned integer noise value consisting of two 64-bit parts, based on the provided index, seed, and noise generation type.

public static ulong2 GetUInt128(ulong index, ulong seed, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

index ulong

The index value used to compute the noise, influencing the position or state of the generated noise.

seed ulong

A 64-bit unsigned integer that adds randomness to the computed noise.

type NoiseType

The noise generation type, which determines the method and mixing algorithm used for noise computation.

Returns

ulong2

A 128-bit unsigned integer represented as a struct containing two 64-bit parts of computed noise.

GetUInt64(ulong, ulong, NoiseType)

Computes a 64-bit unsigned integer noise value based on the provided index, seed, and noise generation type.

public static ulong GetUInt64(ulong index, ulong seed, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

index ulong

The index value used to compute the noise, influencing the position or state of the generated noise.

seed ulong

A 64-bit unsigned integer that adds randomness to the computed noise.

type NoiseType

The noise generation type, which determines the method and algorithm used for noise computation. Defaults to MangledBitsBalancedMix.

Returns

ulong

A 64-bit unsigned integer representing the computed noise value.

GradientCentral(float2, ulong, float, NoiseType)

Computes the central gradient of a 2D Perlin noise function at a given position, using small directional offsets along the x and y axes.

public static float2 GradientCentral(float2 p, ulong seed, float eps = 0.001, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D position at which the gradient should be calculated.

seed ulong

A 64-bit unsigned integer value that provides randomness for the Perlin noise calculation.

eps float

A small offset value used for finite difference calculations to approximate the derivatives. Default is 1e-3.

type NoiseType

The noise generation type, determining the algorithm used for noise computation. Default is MangledBitsBalancedMix.

Returns

float2

A float2 structure representing the gradient vector at the specified position, with x and y components calculated based on Perlin noise.

GradientCentral(float3, ulong, float, NoiseType)

Calculates the central gradient of the Perlin noise function at a given point in 3D space. It computes the gradient by approximating partial derivatives across all axes using a central difference with a small epsilon step size for numerical differentiation.

public static float3 GradientCentral(float3 p, ulong seed, float eps = 0.001, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D point where the gradient is evaluated.

seed ulong

The seed value used for noise generation, ensuring determinism.

eps float

The small step size used for central difference computation. The default is 1e-3f.

type NoiseType

The type of noise function used, defaulting to MangledBitsBalancedMix.

Returns

float3

A float3 vector representing the gradient of the noise function at the specified point.

Perlin(float, float, float, ulong, NoiseType)

Computes a Perlin noise value for a specific 3D point using optional settings for seed value and noise computation type.

public static float Perlin(float x, float y, float z, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x float

The X-coordinate of the input point in 3D space.

y float

The Y-coordinate of the input point in 3D space.

z float

The Z-coordinate of the input point in 3D space.

seed ulong

An optional 64-bit unsigned seed value for adding randomness, defaulting to 0.

type NoiseType

An optional noise type specifying the computation method, defaulting to a balanced mix.

Returns

float

A single-precision floating-point value representing the computed Perlin noise at the given 3D coordinates.

Perlin(float, float, ulong, NoiseType)

Computes Perlin noise value for the specified 2D coordinates (x, y) using the given seed and noise type.

public static float Perlin(float x, float y, ulong seed = 0, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x float

The x-coordinate of the sample point in the 2D noise field.

y float

The y-coordinate of the sample point in the 2D noise field.

seed ulong

An optional 64-bit unsigned integer seed providing additional randomness to the noise output. Defaults to 0.

type NoiseType

The noise generation algorithm type used for computing the noise. Defaults to the system's default noise type.

Returns

float

A single-precision floating-point value representing the computed Perlin noise at the specified coordinates.

PerlinWithDeriv(float, float, float, ulong, out float3, NoiseType)

Computes Perlin noise with derivatives for the given 3D position, seed, and noise generation type.

public static float PerlinWithDeriv(float x, float y, float z, ulong seed, out float3 d, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x float

The x-coordinate of the position in 3D space for noise computation.

y float

The y-coordinate of the position in 3D space for noise computation.

z float

The z-coordinate of the position in 3D space for noise computation.

seed ulong

A 64-bit unsigned integer seed value to control the randomness of the noise behavior.

d float3

An output parameter representing the 3D gradient of the noise at the specified position.

type NoiseType

The noise generation type determining how the noise and gradients are computed.

Returns

float

A single-precision floating-point value representing the computed Perlin noise at the specified position.

PerlinWithDeriv(float, float, ulong, out float2, NoiseType)

Computes a Perlin noise value at the specified 2D coordinates with derivatives, based on the provided seed and noise type.

public static float PerlinWithDeriv(float x, float y, ulong seed, out float2 d, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x float

The X-coordinate of the input position.

y float

The Y-coordinate of the input position.

seed ulong

A 64-bit unsigned integer used as a randomization seed for the noise generation.

d float2

An output parameter that contains the 2D derivatives of the noise in the X and Y directions.

type NoiseType

The noise generation type, which defines the method used for noise computation and mixing.

Returns

float

A floating-point value representing the computed Perlin noise at the specified coordinates.

Ridge(float3, ulong, int, float, float, float, float, float, float, bool, NoiseType)

Computes a ridge noise value using Perlin noise with specific parameters such as frequency, amplitude, lacunarity, gain, ridge offset, and ridge sharpness. This function applies multiple octaves of noise generation and can optionally normalize the output across the range [-1, 1].

public static float Ridge(float3 p, ulong seed = 0, int octaves = 5, float frequency = 1, float amplitude = 1, float lacunarity = 2, float gain = 0.5, float ridgeOffset = 1, float ridgeSharpness = 2, bool normalize = true, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The input 3D position for the noise function.

seed ulong

The seed value to ensure determinism in the generation. Default is 0.

octaves int

The number of noise octaves used to compute the ridge noise. Default is 5.

frequency float

The starting frequency for the noise generation. Default is 1f.

amplitude float

The starting amplitude for the noise generation. Default is 1f.

lacunarity float

The frequency multiplier applied after each octave. Default is 2f.

gain float

The amplitude multiplier applied after each octave. Default is 0.5f.

ridgeOffset float

The offset applied to the ridge transformation. Default is 1.0f.

ridgeSharpness float

The sharpness applied to the ridge calculation. Default is 2.0f.

normalize bool

A boolean flag indicating whether the resulting noise values should be normalized across the range [-1, 1]. Default is true.

type NoiseType

The noise type used for the computation. Default is MangledBitsBalancedMix.

Returns

float

A float value representing the computed ridge noise. The output can range from [-1, 1].

Simplex2DCore(float2, ulong, float, NoiseType)

Computes a 2D Simplex noise value based on the specified position, seed, frequency, and noise type.

public static float Simplex2DCore(float2 position, ulong seed = 0, float frequency = 1, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

position float2

The 2D coordinates at which the noise value is to be computed.

seed ulong

A 64-bit unsigned integer used to initialize the random sequence for noise generation. Defaults to 0.

frequency float

A scaling factor that determines the spatial frequency of the noise. Defaults to 1.

type NoiseType

The noise computation type, influencing the gradient mixing method. Defaults to DefaultNoiseType.

Returns

float

A floating-point number representing the computed Simplex noise value, scaled to approximately the range [-1, 1].

Simplex3DCore(float3, ulong, float, NoiseType)

Calculates a 3D Simplex noise value at the given position using the specified seed, frequency, and noise type.

public static float Simplex3DCore(float3 position, ulong seed = 0, float frequency = 1, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

position float3

The 3D position at which to evaluate the noise function.

seed ulong

An optional 64-bit unsigned integer to seed the noise generation, providing deterministic randomness.

frequency float

The frequency of the noise, scaling the input position to control the level of detail.

type NoiseType

The noise generation type, determining the method used for gradient computation and noise variation.

Returns

float

A single-precision floating-point value representing the computed 3D Simplex noise.

UberNoise(float3, ulong, int, float, float, float, float, float, int, float, float, int, float, NoiseType)

Generates a procedural noise value based on chained domain warps and fractional Brownian motion (fBm), with optional ridge component subtraction. This method produces rich and detailed noise patterns by combining multiple layers of octaves, domain warping, and ridging, allowing for enhanced control over frequency, amplitude, and tonal complexity. “Uber” composition inspired by Watch on YouTube

public static float UberNoise(float3 p, ulong seed = 0, int octaves = 6, float frequency = 1, float lacunarity = 2, float gain = 0.5, float warp1Amp = 0.75, float warp1Freq = 0.5, int warp1Oct = 2, float warp2Amp = 0.35, float warp2Freq = 1.2, int warp2Oct = 2, float ridgeMix = 0.3, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D position in space where the noise is evaluated.

seed ulong

A 64-bit unsigned integer used to initialize noise computation for added randomness. Default is 0.

octaves int

The number of layers of fractal Brownian motion applied. Default is 6.

frequency float

The base frequency of the noise pattern. Default is 1.

lacunarity float

The scaling factor applied to the frequency for each octave. Default is 2.

gain float

The amplitude reduction factor for each successive octave. Default is 0.5.

warp1Amp float

The amplitude of the first domain warp. Default is 0.75.

warp1Freq float

The frequency of the first domain warp. Default is 0.5.

warp1Oct int

The number of octaves used for the first domain warp. Default is 2.

warp2Amp float

The amplitude of the second domain warp. Default is 0.35.

warp2Freq float

The frequency of the second domain warp. Default is 1.2.

warp2Oct int

The number of octaves used for the second domain warp. Default is 2.

ridgeMix float

The blend factor for mixing the ridged noise component with the primary noise. Default is 0.3.

type NoiseType

The noise type used for all operations. Default is the predefined noise type.

Returns

float

A floating-point value representing the computed noise, clamped within the range [-1, 1].

ValueAndGrad(float, float, ulong, out float2, NoiseType)

Computes the value of Perlin noise and its gradient at a given 2D point.

public static float ValueAndGrad(float x, float y, ulong seed, out float2 grad, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

x float

The x-coordinate of the input point.

y float

The y-coordinate of the input point.

seed ulong

A seed value for the noise generation.

grad float2

An output parameter that returns the 2D gradient vector of the noise value at the input point.

type NoiseType

The type of noise to use during computation.

Returns

float

The Perlin noise value at the given 2D point.

ValueAndGrad(float2, ulong, out float2, NoiseType)

Computes the Perlin noise value at a given 2D coordinate, along with its gradient at that point, based on the provided seed and noise generation type.

public static float ValueAndGrad(float2 p, ulong seed, out float2 grad, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

A 2D coordinate represented as a float2 structure, specifying the point for which the noise value and gradient are computed.

seed ulong

A 64-bit unsigned integer that introduces randomness into the noise generation process.

grad float2

An output parameter that stores the computed gradient as a float2 structure for the given 2D point.

type NoiseType

The noise generation type, determining the algorithm and mixing method used for computing the noise value and gradient.

Returns

float

A single-precision floating-point value representing the computed Perlin noise at the specified 2D coordinate.

ValueAndGrad(float3, ulong, out float3, NoiseType)

Computes the Perlin noise value at the given point and calculates its gradient.

public static float ValueAndGrad(float3 p, ulong seed, out float3 grad, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The input position represented as a 3D vector.

seed ulong

The seed value used to ensure deterministic noise generation.

grad float3

The resulting gradient of the Perlin noise at the specified position.

type NoiseType

The type of noise to be used for computation.

Returns

float

Returns the Perlin noise value at the given position.

WorleyBlocky2D(float2, ulong, float, float, CellularDistance, float, NoiseType)

Computes a 2D blocky Worley noise value based on the provided parameters. This function evaluates cellular noise and generates smooth transitions influenced by jitter and distance metrics. Defaults: Chebyshev, jitter=0.1, freq=0.01, edgeWidth=0.1.

public static float WorleyBlocky2D(float2 p, ulong seed = 0, float frequency = 0.01, float jitter = 0.1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Chebyshev, float edgeWidth = 0.1, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D position in space where the noise value will be sampled.

seed ulong

A 64-bit unsigned integer that introduces randomness to the noise generation process.

frequency float

Determines the frequency or “scale” of the noise pattern. Smaller values spread noise features further apart.

jitter float

Controls the variability of the cell center points, affecting the randomness of the generated pattern.

metric HashBasedNoiseUtils.CellularDistance

Specifies the distance metric used to calculate the cellular noise, influencing the shape of the noise cells.

edgeWidth float

Defines the thickness of the edges between the noise cells. Higher values result in thicker transitions.

type NoiseType

The noise generation type, impacting internal computation and mixing operations for noise synthesis.

Returns

float

A floating-point value representing the computed 2D Worley blocky noise at the specified position.

WorleyBlocky3D(float3, ulong, float, float, CellularDistance, float, NoiseType)

Computes a 3D blocky Worley noise value based on the given input parameters, allowing customization of frequency, jitter, distance metrics, and edge width.

public static float WorleyBlocky3D(float3 p, ulong seed = 0, float frequency = 0.012, float jitter = 0.1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Chebyshev, float edgeWidth = 0.12, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D position at which the Worley noise is evaluated, represented as a float3.

seed ulong

The base seed used for randomization, influencing variability in noise generation. Defaults to 0 if unspecified.

frequency float

The frequency of the noise, controlling the scale and number of cells in 3D space. Defaults to 0.012f if unspecified.

jitter float

The amount of randomness applied to cell points, ranging from 0 (no jitter) to higher values increasing randomness. Defaults to 0.1f.

metric HashBasedNoiseUtils.CellularDistance

The cellular distance metric used when determining proximity, such as Euclidean, Manhattan, or Chebyshev. Defaults to Chebyshev.

edgeWidth float

The width of the edges between cells, controlling transition smoothness between cell boundaries. Defaults to 0.12f.

type NoiseType

The noise generation type that determines the mixing algorithm used during computation. Defaults to MangledBitsBalancedMix.

Returns

float

A floating-point value representing the computed Worley 3D noise, ranging within [-1, 1].

WorleyWormy2D(float2, ulong, float, float, CellularDistance, float, NoiseType)

Generates a 2D Worley noise value based on the provided parameters, with additional control over frequency, jitter, and edge width.

public static float WorleyWormy2D(float2 p, ulong seed = 0, float frequency = 0.005, float jitter = 1, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float edgeWidth = 0.1, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float2

The 2D position for which the noise value is computed.

seed ulong

A 64-bit unsigned integer used to introduce randomness into the noise computation. Default is 0.

frequency float

The frequency of the noise pattern, determining the scale or repetition of features. Default is 0.005f.

jitter float

The level of randomness applied to cell points, affecting the distortion of the noise. Default is 1.0f.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used for computation, defining how distances between points are measured (e.g., Euclidean). Default is Euclidean.

edgeWidth float

The width of the edges in the noise pattern, controlling the interpolation around cellular boundaries. Default is 0.1f.

type NoiseType

The noise generation type, dictating the method and mixing algorithm used in the calculation. Default is MangledBitsBalancedMix.

Returns

float

A floating-point value representing the computed 2D Worley noise at the specified position and parameters.

WorleyWormy3D(float3, ulong, float, float, CellularDistance, float, NoiseType)

Generates a 3D cellular noise value with additional control over frequency, jitter, edge width, and distance metric, customized for a “Worley Wormy” effect.

public static float WorleyWormy3D(float3 p, ulong seed = 0, float frequency = 0.006, float jitter = 0.9, HashBasedNoiseUtils.CellularDistance metric = CellularDistance.Euclidean, float edgeWidth = 0.12, NoiseType type = NoiseType.MangledBitsBalancedMix)

Parameters

p float3

The 3D coordinate at which to evaluate the noise.

seed ulong

An optional seed for randomness to ensure variation in noise generation.

frequency float

The frequency of the noise, controlling its scale and detail.

jitter float

Controls the randomness of feature-point distribution within grid cells.

metric HashBasedNoiseUtils.CellularDistance

The distance metric used to compute cell distances, influencing the noise pattern.

edgeWidth float

The width of the transition between cells, affecting the sharpness or smoothness of edges.

type NoiseType

Specifies the noise generation type, determining the algorithm used for computation.

Returns

float

A float value representing the 3D noise at the given coordinate, customized with the provided parameters.