Recursive Ray Tracing
How do we use ray to determine shade of pixel?
At closest intersection point, perform Phong shading.
Gives essentially the same images as standard polygon renderer, but with more primitives.
Idea: Before adding contribution from a light, cast ray to light.
If ray hits another object before hitting light, then don't perform shading calculation.
This gives shadows.
Idea: Cast a ray in the mirror direction.
Add the colour coming from this ray to the shade of the initial ray.
This gives mirror reflections
We perform a full lighting calculation at the first intersection of this reflected ray.
If we send another reflected ray from here, when do we stop?
Answer 1: Stop at a fixed depth.
Answer 2: Accumulate product of reflection coefficients and stop when this product is too small.
CS488/688: Introduction to Interactive Computer Graphics
University of Waterloo
Computer Graphics Lab