     vec3 t3 = t * t * t;
     vec3 t4 = t * t3;
     vec3 t5 = t * t4;
-    return 6.0 * t5 + 15.0 * t4 - 10.0 * t3;
+    return 6.0 * t5 - 15.0 * t4 + 10.0 * t3;
+}
+
+float random(vec3 p) {
+    return fract(sin(p.x * p.y) * 2.0 + cos(p.z) + sin(p.z));
 }
 
 vec3 random3(vec3 p) {

    return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
}

vec3 random32(vec3 p) {
    float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
    float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
    float dot3 = dot(p, vec3(99.5, 430.3, 764.4));
    return fract(sin(vec3(dot1, dot2, dot3)));
}

vec3 getRandomDirection(vec3 p) {
    return (random32(p) * 2.0) - vec3(1.0);
}

float perlinNoise(vec3 p, float freq) {
    float noise = 0.0;
    vec3 cell = floor(p);
    for(float z = 0.0; z <= 1.0; z++) {

            } 
        }
    }
    return noise;
}

// "Frequency" corresponds to smaller cell sizes.
vec3 getWorleyCellPoint(vec3 cell, float freq) {
    vec3 p = cell + random3(cell);
    return p / freq;
}
