Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created January 6, 2021 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/6c0d6df763db3b0aa9b0b08ba485b33d to your computer and use it in GitHub Desktop.
Save todorok1/6c0d6df763db3b0aa9b0b08ba485b33d to your computer and use it in GitHub Desktop.
パーリンノイズを重ね合わせてより自然な地形を作ることを目指したサンプル
using UnityEngine;
/// <Summary>
/// パーリンノイズを重ね合わせて
/// より変化に富んだフィールドを生成するクラスです。
/// </Summary>
public class FieldGeneratorMultiPerlin : FieldGenerator
{
// パーリンノイズのオフセットで使用する乱数のシードです。
public int seed = 0;
// パーリンノイズを重ね合わせる回数を設定します。
public int addTimes = 3;
// パーリンノイズを重ね合わせる回数を設定します。
public int multipleTimes = 2;
// 足し合わせるか、乗算するかのフラグです。
bool isAddMode;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment