package core:math/noise

⌘K
Ctrl+K
or
/

    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

    Types (3)
    Constants (0)

    This section is empty.

    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.

    Types

    Vec2 ¶

    Vec2 :: [2]f64
     

    Input coordinate vectors

    Vec3 ¶

    Vec3 :: [3]f64

    Vec4 ¶

    Vec4 :: [4]f64

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    noise_2d ¶

    noise_2d :: proc(seed: i64, coord: [2]f64) -> (value: f32) {…}
     

    2D Simplex noise, standard lattice orientation.

    noise_2d_improve_x ¶

    noise_2d_improve_x :: proc(seed: i64, coord: [2]f64) -> (value: f32) {…}
     

    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 ¶

    noise_3d_fallback :: proc(seed: i64, coord: [3]f64) -> (value: f32) {…}
     

    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 ¶

    noise_3d_improve_xy :: proc(seed: i64, coord: [3]f64) -> (value: f32) {…}
     

    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 ¶

    noise_3d_improve_xz :: proc(seed: i64, coord: [3]f64) -> (value: f32) {…}
     

    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 ¶

    noise_4d_fallback :: proc(seed: i64, coord: [4]f64) -> (value: f32) {…}
     

    4D OpenSimplex2 noise, fallback lattice orientation.

    noise_4d_improve_xyz ¶

    noise_4d_improve_xyz :: proc(seed: i64, coord: [4]f64) -> (value: f32) {…}
     

    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 ¶

    noise_4d_improve_xyz_improve_xy :: proc(seed: i64, coord: [4]f64) -> (value: f32) {…}
     

    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 ¶

    noise_4d_improve_xyz_improve_xz :: proc(seed: i64, coord: [4]f64) -> (value: f32) {…}
     

    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-20 21:10:46.079830900 +0000 UTC