package core:math/noise
Overview
OpenSimplex2 noise implementation.
Ported from https://github.com/KdotJPG/OpenSimplex2. Copyright 2022 Yuki2 (https://github.com/NoahR02)
OpenSimplex2 noise implementation.
Ported from [[ https://github.com/KdotJPG/OpenSimplex2 }]. Copyright 2022 Yuki2 https://github.com/NoahR02
Index
Constants (0)
This section is empty.
Variables (0)
This section is empty.
Procedure Groups (0)
This section is empty.
Types
Constants
This section is empty.
Variables
This section is empty.
Procedures
noise_2d ¶
2D Simplex noise, standard lattice orientation.
noise_2d_improve_x ¶
2D Simplex noise, with Y pointing down the main diagonal. Might be better for a 2D sandbox style game, where Y is vertical. Probably slightly less optimal for heightmaps or continent maps, unless your map is centered around an equator. It's a subtle difference, but the option is here to make it an easy choice.
noise_3d_fallback ¶
3D OpenSimplex2 noise, fallback rotation option
Use noise_3d_improve_xy
or noise_3d_improve_xz
instead, wherever appropriate.
They have less diagonal bias. This function's best use is as a fallback.
noise_3d_improve_xy ¶
3D OpenSimplex2 noise, with better visual isotropy in (X, Y).
Recommended for 3D terrain and time-varied animations.
The Z coordinate should always be the "different" coordinate in whatever your use case is.
If Y is vertical in world coordinates, call noise_3d_improve_xz(x, z, Y)
or use noise_3d_xz_before_y
.
If Z is vertical in world coordinates, call noise_3d_improve_xz(x, y, Z)
.
For a time varied animation, call noise_3d_improve_xz(x, y, T)
.
noise_3d_improve_xz ¶
3D OpenSimplex2 noise, with better visual isotropy in (X, Z).
Recommended for 3D terrain and time-varied animations.
The Y coordinate should always be the "different" coordinate in whatever your use case is.
If Y is vertical in world coordinates, call noise_3d_improve_xz(x, Y, z)
.
If Z is vertical in world coordinates, call noise_3d_improve_xz(x, Z, y)
or use noise_3d_improve_xy
.
For a time varied animation, call noise_3d_improve_xz(x, T, y)
or use noise_3d_improve_xy
.
noise_4d_fallback ¶
4D OpenSimplex2 noise, fallback lattice orientation.
noise_4d_improve_xyz ¶
4D OpenSimplex2 noise, with XYZ oriented like noise_3d_fallback
and W for an extra degree of freedom. W repeats eventually.
Recommended for time-varied animations which texture a 3D object (W=time)
where there isn't a clear distinction between horizontal and vertical
noise_4d_improve_xyz_improve_xy ¶
4D OpenSimplex2 noise, with XYZ oriented like noise_3d_improve_xy
and W for an extra degree of freedom. W repeats eventually.
Recommended for time-varied animations which texture a 3D object (W=time)
in a space where Z is vertical.
noise_4d_improve_xyz_improve_xz ¶
4D OpenSimplex2 noise, with XYZ oriented like noise_3d_improve_xz
and W for an extra degree of freedom. W repeats eventually.
Recommended for time-varied animations which texture a 3D object (W=time)
in a space where Y is vertical.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-06 21:12:12.627724900 +0000 UTC