fix heightmap noise multiplier argument

This commit is contained in:
MihailRis 2026-08-26 17:29:16 +03:00
parent 81757ad9ae
commit 95b9b346ac

View file

@ -128,11 +128,10 @@ static int l_noise(lua::State* L) {
}
float noiseValue = fnlGetNoise2D(noise, u, v);
float t = 1.0f / static_cast<float>(1 << c) * multiplier;
if (normalizedNoise) {
float t = 1.0f / (static_cast<float>(1 << c) * multiplier);
value = value * (1.0f - t) + noiseValue * t;
} else {
float t = 1.0f / static_cast<float>(1 << c) * multiplier;
value += noiseValue * t;
}
heights[i] = value;