Return material color if there was a ray intersection
This commit is contained in:
parent
3a5c6cddf9
commit
247e205827
1 changed files with 2 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue