summary refs log tree commit diff
path: root/src/Math/Perlin.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-06-29 22:15:32 +0200
committerMel <einebeere@gmail.com>2023-06-29 22:15:32 +0200
commit52732d71e72b02ff45e25f44e414f87ec9ab7666 (patch)
treea3db775e01e04abaf0291e7d172740ff47ff1006 /src/Math/Perlin.hpp
parent92ac46df6afa8ee76f972cceb681cf32658f84a2 (diff)
downloadmeowcraft-52732d71e72b02ff45e25f44e414f87ec9ab7666.tar.zst
meowcraft-52732d71e72b02ff45e25f44e414f87ec9ab7666.zip
Pretty terrain generation
Diffstat (limited to 'src/Math/Perlin.hpp')
-rw-r--r--src/Math/Perlin.hpp3
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;
         }