static NoiseMap CreateTerrainNoiseMap(Module noise, IntSize2 size) { var map = new NoiseMap(); var build = new SharpNoise.Builders.PlaneNoiseMapBuilder() { DestNoiseMap = map, EnableSeamless = false, SourceModule = noise, }; double x = 1; double y = 1; double w = size.Width / 256.0; double h = size.Height / 256.0; build.SetDestSize(size.Width, size.Height); build.SetBounds(x, x + w, y, y + h); build.Build(); //map.BorderValue = 1; //map = NoiseMap.BilinearFilter(map, this.Width, this.Height); return(map); }
static NoiseMap CreateTerrainNoiseMap(Module noise, IntSize2 size) { var map = new NoiseMap(); var build = new SharpNoise.Builders.PlaneNoiseMapBuilder() { DestNoiseMap = map, EnableSeamless = false, SourceModule = noise, }; double x = 1; double y = 1; double w = size.Width / 256.0; double h = size.Height / 256.0; build.SetDestSize(size.Width, size.Height); build.SetBounds(x, x + w, y, y + h); build.Build(); //map.BorderValue = 1; //map = NoiseMap.BilinearFilter(map, this.Width, this.Height); return map; }