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.


  normal = get_normal(pixel);

  reflection_map(pixel, normal);

  calculate_lighting(pixel, normal);

Sample Output


brian martin