From c94c3930af8c81568be50bdfaaac321b99e296d7 Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 9 Mar 2020 18:34:24 +0100 Subject: Colors are floats now --- ray.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ray.c') diff --git a/ray.c b/ray.c index 9d18bdb..35ec5b1 100644 --- a/ray.c +++ b/ray.c @@ -237,15 +237,15 @@ exit: color_t *ray_trace(space_t *s, unsigned int x, unsigned int y) { + // Init return color. Will be accumilated with all the detected light. + color_t *c = color_set(NULL, s->ambient.r, s->ambient.g, s->ambient.b); + // Setup primary ray ray_t r; r.start = &s->view.position; r.direction = vector_copy(NULL, NULL); viewpoint_ray(&s->view, r.direction, x, y); - // Init return color. Will be accumilated with all the detected light. - color_t *c = color_set(NULL, s->ambient.r, s->ambient.g, s->ambient.b); - // Run the recursive ray trace ray_trace_recur(s, c, &r, 0, 1); -- cgit v1.2.3