mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix rivers depth
This commit is contained in:
parent
347a01e0c2
commit
33a73a0014
1 changed files with 5 additions and 4 deletions
|
|
@ -8,16 +8,17 @@ function generate_heightmap(x, y, w, h)
|
|||
|
||||
local map = Heightmap(w, h)
|
||||
map:noise({x, y}, 0.02, 7, 0.2)
|
||||
map:noise({x, y}, 0.06, 8, 0.5, umap, vmap)
|
||||
map:noise({x, y}, 0.06, 8, 0.4, umap, vmap)
|
||||
map:mul(0.5)
|
||||
map:add(0.3)
|
||||
map:add(0.1)
|
||||
map:pow(2.0)
|
||||
|
||||
local rivermap = Heightmap(w, h)
|
||||
rivermap:noise({x+21, y+12}, 0.03, 4)
|
||||
rivermap:noise({x+21, y+12}, 0.1, 4)
|
||||
rivermap:abs()
|
||||
rivermap:mul(2.0)
|
||||
rivermap:pow(0.18)
|
||||
rivermap:pow(0.4)
|
||||
rivermap:max(0.6)
|
||||
map:add(0.4)
|
||||
map:mul(rivermap)
|
||||
map:add(-0.2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue