From 34428a764d401fa98ba102ff047781c2aedc4097 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 8 Sep 2013 08:45:13 -0700 Subject: [PATCH] If ray intersects shape, return the shape's color --- src/scene.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scene.c b/src/scene.c index 7678bb2..e95c649 100644 --- a/src/scene.c +++ b/src/scene.c @@ -10,6 +10,7 @@ #include #include "scene.h" +#include "texture.h" struct _ObjectList @@ -170,5 +171,6 @@ scene_trace_ray(Scene *scene, const Ray ray, const int depth) return out_color; } - return out_color; + Texture *tex = object_get_texture(intersected_obj); + return texture_get_color(tex); }