mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2025-06-30 07:20:50 +02:00
Added an offset of 0.5 on terrain elevation
This prevents rounding errors and improves interpolation on nearly flat areas
This commit is contained in:
2
init.lua
2
init.lua
@ -221,7 +221,7 @@ local function generate(minp, maxp, seed)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local vdem = poly.dem
|
local vdem = poly.dem
|
||||||
local terrain_height = math.floor(interp(
|
local terrain_height = math.floor(0.5+interp(
|
||||||
vdem[1],
|
vdem[1],
|
||||||
vdem[2],
|
vdem[2],
|
||||||
vdem[3],
|
vdem[3],
|
||||||
|
Reference in New Issue
Block a user