Return material color if there was a ray intersection

This commit is contained in:
Eryn Wells 2013-09-11 10:33:56 -07:00
parent 3a5c6cddf9
commit 247e205827

View file

@ -167,11 +167,10 @@ Scene::trace_ray(const Ray &ray, const int depth)
}
// If there was no intersection, return black.
if (intersected_shape != NULL) {
if (intersected_shape == NULL) {
return Color::Black;
}
// TODO: Lighting.
return Color::Red;
return intersected_shape->get_material().get_color();
}