Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
snow in mountains only
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Apr 30, 2024
1 parent da6b247 commit bbaa968
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sources/coloringModes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,11 +820,11 @@ namespace unnatural

void generateSnow(Tile &tile)
{
static const Holder<NoiseFunction> tempOffsetNoise = []()
static const Holder<NoiseFunction> elevOffsetNoise = []()
{
NoiseFunctionCreateConfig cfg;
cfg.type = NoiseTypeEnum::Value;
cfg.frequency = 0.015;
cfg.frequency = 0.055;
cfg.seed = noiseSeed();
return newNoiseFunction(cfg);
}();
Expand All @@ -839,7 +839,7 @@ namespace unnatural
return newNoiseFunction(cfg);
}();

Real bf = sharpEdge(rangeMask(tile.temperature + tempOffsetNoise->evaluate(tile.position) * 1.5, 0, -2) * rangeMask(tile.precipitation, 10, 15) * steepnessMask(tile.slope, Degs(25), Degs(3)) * beachMask(tile));
Real bf = sharpEdge(rangeMask(tile.elevation + elevOffsetNoise->evaluate(tile.position) * 20, 220, 240) * steepnessMask(tile.slope, Degs(25), Degs(5)));
const Real thickness = thicknessNoise->evaluate(tile.position) * 0.5 + 0.5;
bf *= saturate(thickness * 0.5 + 0.7);
if (bf < 1e-7)
Expand Down

0 comments on commit bbaa968

Please sign in to comment.