diff options
author | Morten Hustveit <morten.hustveit@gmail.com> | 2014-12-02 17:21:23 -0500 |
---|---|---|
committer | Morten Hustveit <morten.hustveit@gmail.com> | 2014-12-02 17:21:23 -0500 |
commit | c1c1559007f5557ebfc2a19899224ee9df2f9447 (patch) | |
tree | 09d39f9acd268edb5a211d297e9d9aa6ebb14805 /ray.c | |
parent | b95d4c408a9f4161d29cbd9058b62a0b5079dea8 (diff) |
ray.c: Calculate reflection only once per hit
This saves 10ms on yelena.
Diffstat (limited to 'ray.c')
-rw-r--r-- | ray.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -78,9 +78,9 @@ trace(const float s[3], const float d[3], float pixel[3], int n, unsigned int ma for(k = 0; k < 3; ++k) pixel[k] += lights[m].diffuse[k] * objects[j].diffuse[k] * scale; } - - trace(y, r, pixel, n + 1, (1 << j)); } + + trace(y, r, pixel, n + 1, (1 << j)); } } } |