Skip to content

Commit

Permalink
Vertical biome blend: Tune blend patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Feb 20, 2018
1 parent 2bc7c5f commit f9ad061
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/mapgen/mg_biome.cpp
Expand Up @@ -133,7 +133,7 @@ Biome *BiomeManager::getBiomeFromNoiseOriginal(float heat, float humidity, s16 y
}
}

mysrand(y + (heat - humidity) * 2);
mysrand(y + (heat + humidity) / 2);
if (biome_closest_blend &&
myrand_range(0, biome_closest_blend->vertical_blend) >=
y - biome_closest_blend->y_max)
Expand Down Expand Up @@ -196,7 +196,7 @@ BiomeGenOriginal::~BiomeGenOriginal()
delete noise_humidity_blend;
}


// Only usable in a mapgen thread
Biome *BiomeGenOriginal::calcBiomeAtPoint(v3s16 pos) const
{
float heat =
Expand Down Expand Up @@ -286,8 +286,9 @@ Biome *BiomeGenOriginal::calcBiomeFromNoise(float heat, float humidity, s16 y) c
}

// Carefully tune pseudorandom seed variation to avoid single node dither
// and create larger scale blending patterns.
mysrand(y + (heat - humidity) * 2);
// and create larger scale blending patterns similar to horizontal biome
// blend.
mysrand(y + (heat + humidity) / 2);

if (biome_closest_blend &&
myrand_range(0, biome_closest_blend->vertical_blend) >=
Expand Down

0 comments on commit f9ad061

Please sign in to comment.