diff --git a/src/scene.c b/src/scene.c index d7f88b1..ae43597 100644 --- a/src/scene.c +++ b/src/scene.c @@ -152,7 +152,7 @@ scene_trace_ray(Scene *scene, const Ray ray, const int depth) // Find intersections of this ray with objects in the scene. Object *intersected_obj = NULL; float *t = NULL; - float nearest_t; + float nearest_t = 1e8; int nints; ObjectList *ptr = scene->objects; while (ptr != NULL) {