dilevin / computer-graphics-ray-tracing

Computer Graphics Assignment about Ray Tracing
1 stars 5 forks source link

Reflections not showing up #47

Closed lnvariant closed 4 years ago

lnvariant commented 4 years ago

I'm having trouble with reflections showing up in sphere-packing on the spheres. I have followed the slides and the book, and can't seem to figure out why exactly it's not working. I am recursively sending reflection rays which themselves send rays, up until the limit (10).

Capture

The sphere plane looks fine:

2

darren-moore commented 4 years ago

Turn down the number of reflections to just 1 when debugging reflections. Though, the speculars in your sphere-packing example look off. Are the speculars correct if you turn off reflections?

lnvariant commented 4 years ago

Turn down the number of reflections to just 1 when debugging reflections. Though, the speculars in your sphere-packing example look off. Are the speculars correct if you turn off reflections?

The image looks exactly the same after changing to only 1 reflection. Does this mean there's a problem in my blinn_phong_shading?

EDIT:

turning off reflections:

3

darren-moore commented 4 years ago

should look something like this without reflections. Note the specular highlight image

lnvariant commented 4 years ago

should look something like this without reflections. Note the specular highlight

Which makes me wonder why it's breaking for three spheres but works fine to sphere and plane?

lnvariant commented 4 years ago

Running it in release build fixed the issue. Don't understand why.