Commit: e262e4f2896d2c74bd3235930a4673690306a635 Author: Sebastian Herholz Date: Wed Sep 7 13:53:37 2022 +0200 Branches: cycles_path_guiding https://developer.blender.org/rBe262e4f2896d2c74bd3235930a4673690306a635
Guiding: Added support to handle different Open PGL versions =================================================================== M intern/cycles/integrator/path_trace.cpp M intern/cycles/integrator/path_trace.h =================================================================== diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp index fdcf1490614..069fda92a53 100644 --- a/intern/cycles/integrator/path_trace.cpp +++ b/intern/cycles/integrator/path_trace.cpp @@ -1333,14 +1333,12 @@ void PathTrace::guiding_prepare_structures() void PathTrace::guiding_update_structures() { #ifdef WITH_PATH_GUIDING - // TODO(sherholz): implement # ifdef WITH_PATH_GUIDING_DEBUG_PRINT VLOG_WORK << "Path Guiding: update guiding structures"; VLOG_WORK << "SampleDataStrorage: #surface samples = " << guiding_sample_data_storage_->GetSizeSurface() << "\t#volumesamples = " << guiding_sample_data_storage_->GetSizeVolume(); # endif - // int training_iteration = guiding_field_->GetIteration(); if (true) { const size_t num_valid_samples = guiding_sample_data_storage_->GetSizeSurface() + guiding_sample_data_storage_->GetSizeVolume(); @@ -1361,14 +1359,16 @@ void PathTrace::guiding_update_structures() } } */ +#if OPENPGL_VERSION_MINOR < 4 const size_t num_samples = 1; guiding_field_->Update(*guiding_sample_data_storage_, num_samples); +#else + guiding_field_->Update(*guiding_sample_data_storage_); +#endif guiding_update_count++; # if defined(WITH_PATH_GUIDING_DEBUG_PRINT) && PATH_GUIDING_DEBUG_VALIDATE VLOG_WORK << "Field: valid = " << guiding_field_->Validate(); # endif - // if(guiding_update_count<=1) - guiding_sample_data_storage_->Clear(); } } diff --git a/intern/cycles/integrator/path_trace.h b/intern/cycles/integrator/path_trace.h index fe823d73612..59a0ef6d742 100644 --- a/intern/cycles/integrator/path_trace.h +++ b/intern/cycles/integrator/path_trace.h @@ -17,6 +17,7 @@ #include "util/vector.h" #ifdef WITH_PATH_GUIDING +# include <openpgl/version.h> # include <openpgl/cpp/OpenPGL.h> #endif _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs