diff options
author | Julian T <julian@jtle.dk> | 2020-03-09 18:34:24 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-03-09 18:34:24 +0100 |
commit | c94c3930af8c81568be50bdfaaac321b99e296d7 (patch) | |
tree | f776896e941b64076bdd067829a6ca9323cc67f7 /ray.c | |
parent | 7837a28251bc3b326423ba40ccac0c8ffe23f968 (diff) |
Colors are floats now
Diffstat (limited to 'ray.c')
-rw-r--r-- | ray.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |