mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
fix heightmap noise multiplier argument
This commit is contained in:
parent
81757ad9ae
commit
95b9b346ac
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue