Example #1
0
 private void addElevation(int octaves, float roughness, float scale, float amplitude)
 {
     bounds.iterate((x, y) => { elevation[x, y] += Mathf.PerlinNoise(xOffset + (x * scale), yOffset + (y * scale)) * amplitude; });
 }
 private void addElevation(int octaves, float roughness, float scale, float amplitude)
 {
     xOffset = Random.value * 10000;
     yOffset = Random.value * 10000;
     bounds.iterate((x, y) => container.heightsMap[x, y] += Mathf.PerlinNoise(xOffset + x * scale, yOffset + y * scale) * amplitude);
 }