diff options
author | Julian T <julian@jtle.dk> | 2020-03-25 18:53:37 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-03-25 19:27:11 +0100 |
commit | 7a48ecd394f7b3b8f0f6e18606f681ffac3e3a7c (patch) | |
tree | 9645bf9381263cb9acf8b9724d47c834d7e9a473 /ray.c | |
parent | d87ae2cd9871806d18ac4f86b5e12e2c52aadc52 (diff) |
Create new fitting scene to test area lights
Diffstat (limited to 'ray.c')
-rw-r--r-- | ray.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -276,7 +276,7 @@ int ray_trace_recur(space_t *s, color_t *dest, ray_t *ray, unsigned hop, COORD_T // Calculate normal vector vector_t N; - obj_norm_at(o, &N, r.start); + obj_norm_at(o, &N, r.start, ray->direction); // Check if we should calculate light if (o->m->defuse + o->m->specular > ZERO_APROX) { @@ -290,7 +290,7 @@ int ray_trace_recur(space_t *s, color_t *dest, ray_t *ray, unsigned hop, COORD_T } // Calculate reflection vector - if (hop < 2 && o->m->reflective > ZERO_APROX) { + if (hop < 10 && o->m->reflective > ZERO_APROX) { vector_scale(r.direction, &N, 2 * vector_dot(ray->direction, &N)); vector_sub(r.direction, ray->direction, r.direction); |