next up prev
Next: Browser Up: Ray Casting algorithm Previous: Filling the depth buffer

Assigning color

After the depth to the fractal from the camera is computed at each pixel, another thread goes through and determines what color to assign to each pixel. This is done by calculating the surface normal at each pixel and projecting the ray into an environment map.

compute_color(pixel)

  normal = get_normal(pixel);

  reflection_map(pixel, normal);

  calculate_lighting(pixel, normal);

Sample Output

\resizebox*{0.5\textwidth}{!}{\includegraphics{example.eps}}



brian martin
1999-06-23