bunch of noise stuff

This commit is contained in:
Yggdrasil75
2025-11-07 13:27:05 -05:00
parent 82c0e2527f
commit 90a34cd433
3 changed files with 475 additions and 60 deletions

View File

@@ -32,14 +32,14 @@ private:
Vec4 waterColor;
public:
Sim2(int width = 512, int height = 512, uint32_t seed = 12345)
Sim2(int width = 512, int height = 512, uint32_t seed = 42)
: gridWidth(width), gridHeight(height), scale(4.0f), octaves(4),
persistence(0.5f), lacunarity(2.0f), seed(seed), offset(0, 0),
elevationMultiplier(1.0f), waterLevel(0.3f),
landColor(0.2f, 0.8f, 0.2f, 1.0f), // Green
waterColor(0.2f, 0.3f, 0.8f, 1.0f) // Blue
{
noiseGenerator = std::make_unique<Noise2>(seed);
noiseGenerator = std::make_unique<Noise2>(seed,Noise2::WORLEY,Noise2::PRECOMPUTED);
generateTerrain();
}