 vec2 p = floor(x);
    vec2 f = fract(x);
    f = f*f*(3.0-2.0*f);
    float n = p.x + p.y*57.0;
    float res = mix(mix( Hash(n+  0.0), Hash(n+  1.0),f.x),
                    mix( Hash(n+ 57.0), Hash(n+ 58.0),f.x),f.y);
    return res;
}

float FractalNoise(in vec2 xy)
{
   float w = .7;
   float f = 0.0;
   for (int i = 0; i < 3; i++)
   {
      f += Noise(xy) * w;
      w = w*0.6;
      xy = 2.0 * xy;
   }
   return f;
}

float Plane(vec3 p, vec3 n)
{
   return dot(p, n);
}

