예제 #1
0
    public float sample(Vector2 v)
    {
        //max value for x will be:
        float max = noise_set.getYScale();

        float to_index = (noise_set.y_res - 1f) / noise_set.getYScale();

        return((1 - v.y / max) * perlin.sample(v) + v.y * edge_noise[(int)(v.x * to_index)] / max);
    }
예제 #2
0
 public float sample(float[] arr)
 {
     return(Mathf.Pow(1 - Mathf.Abs(perlin.sample(arr)), 2));
 }
예제 #3
0
 public float sample(float f)
 {
     return(perlin.sample(new Vector2(0f, f)));
 }