![]() |
LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
|
Functions | |
| fnl_state | fnlCreateState () |
| float | fnlGetNoise2D (fnl_state *state, FNLfloat x, FNLfloat y) |
| float | fnlGetNoise3D (fnl_state *state, FNLfloat x, FNLfloat y, FNLfloat z) |
| void | fnlDomainWarp2D (fnl_state *state, FNLfloat *x, FNLfloat *y) |
| void | fnlDomainWarp3D (fnl_state *state, FNLfloat *x, FNLfloat *y, FNLfloat *z) |
=== Perlin noise funcs ===
Now using FastNoiseLite lib by Jordan Peck - seems pretty good
NOTE: FOLLOWING CODE IS COPYRIGHT(C) 2023 JORDAN PECK
=== Fast Noise Lite ===
| fnl_state fnlCreateState | ( | ) |
Creates a noise state with default values.
| seed | Optionally set the state seed. |
| float fnlGetNoise2D | ( | fnl_state * | state, |
| FNLfloat | x, | ||
| FNLfloat | y | ||
| ) |
2D noise at given position using the state settings
| float fnlGetNoise3D | ( | fnl_state * | state, |
| FNLfloat | x, | ||
| FNLfloat | y, | ||
| FNLfloat | z | ||
| ) |
3D noise at given position using the state settings
| void fnlDomainWarp2D | ( | fnl_state * | state, |
| FNLfloat * | x, | ||
| FNLfloat * | y | ||
| ) |
2D warps the input position using current domain warp settings.
Example usage with fnlGetNoise2D:
| void fnlDomainWarp3D | ( | fnl_state * | state, |
| FNLfloat * | x, | ||
| FNLfloat * | y, | ||
| FNLfloat * | z | ||
| ) |
3D warps the input position using current domain warp settings.
Example usage with fnlGetNoise3D: