Initial photon tracing code and direct lighting bugfixes.