Directional Light



I wanted to simulate the sunlight using a directional light because it seemed a lot more straight forward than trying to correctly approximate the sunlight in the scene. Maybe it is, maybe it isn't. I also knew I wanted to have more soft shadows the further the shadow was from the occluder, so I decided to model the light as a disc. Normally a directional light has a direction and an area it applies to; at any given point the direction l to the light is the stored direction, and the falloff can be approximated by taking the wattage divided by the area it emits through. In our case, I offset the direction vector by sampling a disc whose radius is a field of the light.


For photon emission a planar projection map was used


(low sample test image)