Added partial support for point lights in photon map generation.

This commit is contained in:
2017-03-06 18:00:41 -04:00
parent 8e7c6490ec
commit 1faaaf0d63
2 changed files with 67 additions and 30 deletions

View File

@@ -114,7 +114,7 @@ int main(int argc, char ** argv) {
cout << "Using " << ANSI_BOLD_YELLOW << "Jensen's photon mapping" << ANSI_RESET_STYLE << " with ray tracing." << endl;
p_tracer = new PhotonTracer(g_max_depth, g_p_sample_radius);
if (g_photons_file == NULL) {
//cout << "Building global photon map with " << ANSI_BOLD_YELLOW << g_photons / 2 << ANSI_RESET_STYLE << " primary photons per light source." << endl;
cout << "Building global photon map with " << ANSI_BOLD_YELLOW << g_photons / 2 << ANSI_RESET_STYLE << " primary photons per light source." << endl;
//p_tracer->photon_tracing(scn, g_photons / 2);
cout << "Building caustics photon map with " << ANSI_BOLD_YELLOW << g_photons / 2 << ANSI_RESET_STYLE << " primary photons per light source." << endl;
p_tracer->photon_tracing(scn, g_photons / 2, true);