Closed milomg closed 1 month ago
Same, I am also getting something similar but incorrect obviously
I'm also having a similar issue, if I keep the default min_t
to first_hit
(which I believe is 1.0), I'm able to get the same as @FalakR above, but if I use min_t = 1e-4
or some small number, I get the picture from the original issue.
I had a similar issue and it turns out that my shadow ray was not normalized in bling_phong_shading.cpp before I passed it into first_hit
Thanks, that worked! (and that also explains why it wasn't working, the t
values that I was comparing wasn't comparing distances correctly because velocity was different)
Some important constants I use:
raycolor(ray,1e-4,objects,lights,0,rgb);
- from main.cpp (the same constant is passed into recursive calls)I add
+ 1e-9 * n
to the shadow_ray and the mirror_rayI do
first_hit(shadow_ray, 1e-4, ...)
I stop raycolor when
num_recursive_calls > 5
Possibly related to #69