     );
 }
 
-vec3 random_on_hemisphere(
-    const vec3 center, const float radius, const vec3 normal,
-    const float r1, const float r2) {
-
-    float a = M_2_PI * r1;
-    float b = sqrt(1.0 - r2 * r2);
-
-    vec3 v = normalize(vec3(cos(a) * b, sin(a) * b, r2));
-
-    // align with hemisphere normal
-
-    vec3 axis = normalize(cross(normal, UNIT_Y));
-    float angle = acos(dot(normal, v));
-
-    vec3 d = rotation_axis_angle(axis, angle) * v;
-
-    return center + d * radius;
-}
-
 // tracing
 
 /**


    int type;
    int index;
};

struct Ray {

            vec3 collision_point = (ray.origin + ray.direction * t);
            collision.normal = normalize(collision_point - position);

            collision.material.type = geometry_sphere_material_type[i];
            collision.material.index = geometry_sphere_material_index[i];
        }
    }
}
