Added caves

This commit is contained in:
Namonay
2025-06-01 22:43:32 +02:00
parent f40d8ac221
commit ac549e4d09
2 changed files with 43 additions and 16 deletions

View File

@@ -16,7 +16,7 @@ class NoiseCollection
public:
inline NoiseCollection(const std::uint32_t seed): c_biomecollection()
{
m_collection.emplace("terrain", std::make_unique<Noise>(seed, // seed
m_collection.emplace("terrain", std::make_unique<Noise>(seed,
0.045f,
0.8f,
4,
@@ -25,7 +25,7 @@ class NoiseCollection
4,
1.2f
));
m_collection.emplace("humidity", std::make_unique<Noise>(seed, // seed
m_collection.emplace("humidity", std::make_unique<Noise>(seed,
0.02f,
0.3f,
1,
@@ -34,15 +34,24 @@ class NoiseCollection
2,
1.0f
));
m_collection.emplace("caves", std::make_unique<Noise>(seed,
0.02f,
m_collection.emplace("caves_depth", std::make_unique<Noise>(seed + 2,
0.15f,
1.0f,
5,
2,
2.0f,
0.5f,
3,
2,
1.0f
)); // TODO !!!!!!
));
m_collection.emplace("caves_radius", std::make_unique<Noise>(seed + 3,
0.15f,
1.0f,
4,
2.0f,
0.7f,
4,
1.0f
));
m_collection.emplace("biomes", std::make_unique<Noise>(seed + 1,
0.05f,
0.1f,
@@ -67,6 +76,7 @@ class NoiseCollection
inline void AddNoise(std::string key, std::unique_ptr<Noise> noise) { m_collection.emplace(std::move(key), std::move(noise)); }
const std::array<std::uint32_t, CHUNK_SIZE.y> GetBlocks(Scop::Vec2i pos);
const std::array<std::uint32_t, CHUNK_SIZE.y> CarveCaves(std::array<std::uint32_t, CHUNK_SIZE.y> &data, std::uint32_t threshold, std::uint32_t cave_radius, std::uint32_t coef);
~NoiseCollection() = default;
private: