Ejemplo n.º 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);
    }
Ejemplo n.º 2
0
 public float sample(float[] arr)
 {
     return(Mathf.Pow(1 - Mathf.Abs(perlin.sample(arr)), 2));
 }
Ejemplo n.º 3
0
 public float sample(float f)
 {
     return(perlin.sample(new Vector2(0f, f)));
 }