private float GetPixelShade(int x, int y) { var baseLandscape = _generalRollingBaseNoise.GetNoise(x, y); var level = _generalLandscapeNoise.GetNoise(x, y); if (level < _riverFactor) { level = BaseLevel + baseLandscape + level - level * riverLoweringFactor; } else if (level > _canyonFactor) { level = BaseLevel + baseLandscape + level; var step = (float)(Math.Round((double)level / 3200) * 3200); if (step < level) { step = level; } level = step + _featureRockNoise.GetNoise(x, y); } else { level = BaseLevel + baseLandscape + level; } return(level < 0 ? 0 : level); }
private ushort GetPixelShade(int x, int y) { //float baseLandscape = _generalRollingBaseNoise.GetNoise(x, y); var level = _swampPathNoise.GetNoise(x, y); level = BaseLevel + (float)(Math.Round((double)level / _stepFactor) * _stepFactor); if (level < _pathLevel) { level = _pathLevel - _swampFillerNoise.Amplitude + _swampFillerNoise.GetNoise(x, y); } /* * else if (level > _canyonFactor) * { * level = _baseLevel + baseLandscape + level; * var step = (float) (Math.Round((double) level / 3200) * 3200); * if (step < level) step = level; * //level = _baseLevel + step; * //level = (_cellNoise.GetNoise(x, y) * _cellNoiseMultiplier); (_cellNoise.GetNoise(x, y) * _cellNoiseMultiplier);// * level = step + _featureRockNoise.GetNoise(x, y); * } * else * { * level = _baseLevel + baseLandscape + level; * } */ return(level < 0 ? (ushort)0 : (ushort)level); }
private ushort GetPixelShade(int x, int y) { float baseLandscape = _generalRollingBaseNoise.GetNoise(x, y); float level = _generalLandscapeNoise.GetNoise(x, y); level = WorldSettings.GroundLevel + baseLandscape + level; return((ushort)(level < 0 ? 0 : level)); }
private ushort GetPixelShade(int x, int y) { float level = _mazeNoise.GetNoise(x, y); if (level > _riverFactor) { level = BaseLevel; } else { level = BaseLevel + _generalLandscapeNoise.GetNoise(x, y); //+ _featureNoise.GetNoise(x, y); } return(level < 0 ? (ushort)0 : (ushort)level); }