diff options
| author | Mel <einebeere@gmail.com> | 2023-06-29 22:15:32 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-06-29 22:15:32 +0200 |
| commit | 52732d71e72b02ff45e25f44e414f87ec9ab7666 (patch) | |
| tree | a3db775e01e04abaf0291e7d172740ff47ff1006 /src/Math/Perlin.hpp | |
| parent | 92ac46df6afa8ee76f972cceb681cf32658f84a2 (diff) | |
| download | meowcraft-52732d71e72b02ff45e25f44e414f87ec9ab7666.tar.zst meowcraft-52732d71e72b02ff45e25f44e414f87ec9ab7666.zip | |
Pretty terrain generation
Diffstat (limited to 'src/Math/Perlin.hpp')
| -rw-r--r-- | src/Math/Perlin.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Math/Perlin.hpp b/src/Math/Perlin.hpp index c31697b..17d33fd 100644 --- a/src/Math/Perlin.hpp +++ b/src/Math/Perlin.hpp @@ -16,6 +16,7 @@ struct Noise { uint octaves = 3; float persistence = 0.3f; + float lacunarity = 2.0f; float at(Vector<D> pos) const { float result = 0; @@ -27,7 +28,7 @@ struct Noise { result += raw((pos + offset).abs() / scale * frequency) * amplitude; max += amplitude; - frequency *= 2; + frequency *= lacunarity; amplitude *= persistence; } |
