[ LiB ] |
In order to save the illumination separated from the geometry in the scene, the photon structure is required. The photon structure is stored on surfaces in the scene. Remember that photons represent incoming illumination from your light sources. Each photon tells you where the energy is flowing and carries a portion of the light source wattage.
Here is the structure of this simple photon:
typedef struct { cVector3 tPosition; color3 tPower; cVector3 tDirection; } photon_t;
[ LiB ] |