Added define to skip photon file saving.

This commit is contained in:
2017-07-13 09:43:50 -04:00
parent c97a2d4fe3
commit 783e5daaea
2 changed files with 3 additions and 1 deletions

View File

@@ -326,6 +326,7 @@ void PhotonTracer::photon_tracing(Scene * s, const size_t n_photons_per_ligth, c
cout << "Generated " << ANSI_BOLD_YELLOW << m_photon_map.stored_photons << ANSI_RESET_STYLE << " total photons." << endl;
//m_photon_map.save_photon_list(specular ? "caustics.txt" : "photons.txt");
#ifdef SAVE_FILES
string file_name = specular ? "caustics.txt" : "photons.txt";
cout << "Writing photons to \x1b[1;33m" << file_name << "\x1b[m" << endl;
@@ -340,6 +341,7 @@ void PhotonTracer::photon_tracing(Scene * s, const size_t n_photons_per_ligth, c
r << " " << g << " " << b << " " << m_photon_map.photons[i].ref_index << endl;
}
ofs.close();
#endif
}
void PhotonTracer::build_photon_map(const char * photons_file, const bool caustics) {