Chapter 12. Photon Rendering
This chapter will guide you to complete the implementation of the pho-ton-mapping algorithm. The photon-rendering process is the second pass of the two-pass technique. The last chapter showed you how to trace photons and determine the behavior of photons based on a probabilistic solution. This chapter focuses on how to render the reflected radiance in conjunction with the photon map in order to render an image using photon mapping. You'll build a few more structures and methods for searching for photons in the photon map. When you're done, you'll inherit everything in the cScene class. The cScene class will then be capable of rendering images using ray tracing and photon mapping. The photon-mapping technique becomes simple once you understand the procedures necessary for implementing the algorithm.