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:
Gael-de-Sailly 2020-04-13 12:27:24 +02:00
parent 13d3e70b66
commit 1adb4fbece

View File

@ -221,7 +221,7 @@ local function generate(minp, maxp, seed)
end
local vdem = poly.dem
local terrain_height = math.floor(interp(
local terrain_height = math.floor(0.5+interp(
vdem[1],
vdem[2],
vdem[3],