Commit: 263b1ce524796e6709cca0b2fc77093bc95d129c
Author: Brecht Van Lommel
Date:   Fri Aug 6 15:03:06 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB263b1ce524796e6709cca0b2fc77093bc95d129c

Fix missing Combined pass when using Denoising Data

Remove Integrator.store_denoising_passes and just fill the passes if they
exist, there's no need for this option.

===================================================================

M       intern/cycles/blender/blender_sync.cpp
M       intern/cycles/device/device_denoise.h
M       intern/cycles/render/denoising.cpp
M       intern/cycles/render/film.cpp
M       intern/cycles/render/integrator.cpp
M       intern/cycles/render/integrator.h

===================================================================

diff --git a/intern/cycles/blender/blender_sync.cpp 
b/intern/cycles/blender/blender_sync.cpp
index 9d3daf6fb2e..fb04ac79358 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -368,7 +368,6 @@ void BlenderSync::sync_integrator(BL::ViewLayer 
&b_view_layer, bool background)
    * denoiser parameters before enabling it without render resetting on every 
change. The downside
    * is that the interface and the integrator are technically out of sync. */
   if (denoise_params.use) {
-    integrator->set_denoise_store_passes(denoise_params.store_passes);
     integrator->set_denoiser_type(denoise_params.type);
     integrator->set_denoise_start_sample(denoise_params.start_sample);
     integrator->set_use_denoise_pass_albedo(denoise_params.use_pass_albedo);
@@ -606,18 +605,13 @@ void BlenderSync::sync_render_passes(BL::RenderLayer 
&b_rlay, BL::ViewLayer &b_v
   PointerRNA crl = RNA_pointer_get(&b_view_layer.ptr, "cycles");
 
   if (get_boolean(crl, "denoising_store_passes")) {
-    add_denoised_passes = true;
-
-    b_engine.add_pass("Noisy Image", 4, "RGBA", b_view_layer.name().c_str());
-    pass_add(scene, PASS_COMBINED, "Noisy Image", PassMode::NOISY);
-
     b_engine.add_pass("Denoising Normal", 3, "XYZ", 
b_view_layer.name().c_str());
     pass_add(scene, PASS_DENOISING_NORMAL, "Denoising Normal", 
PassMode::NOISY);
 
     b_engine.add_pass("Denoising Albedo", 3, "RGB", 
b_view_layer.name().c_str());
     pass_add(scene, PASS_DENOISING_ALBEDO, "Denoising Albedo", 
PassMode::NOISY);
   }
-  else if (get_boolean(cscene, "use_denoising")) {
+  if (get_boolean(cscene, "use_denoising")) {
     add_denoised_passes = true;
 
     b_engine.add_pass("Noisy Image", 4, "RGBA", b_view_layer.name().c_str());
@@ -902,8 +896,6 @@ DenoiseParams BlenderSync::get_denoise_params(BL::Scene 
&b_scene,
                                              DENOISER_INPUT_NUM,
                                              DENOISER_INPUT_RGB_ALBEDO_NORMAL);
 
-      denoising.store_passes = get_boolean(clayer, "denoising_store_passes");
-
       denoising.prefilter = (DenoiserPrefilter)get_enum(
           clayer, "denoising_prefilter", DENOISER_PREFILTER_NUM, 
DENOISER_PREFILTER_NONE);
     }
diff --git a/intern/cycles/device/device_denoise.h 
b/intern/cycles/device/device_denoise.h
index 78090b4e328..078efc5ee27 100644
--- a/intern/cycles/device/device_denoise.h
+++ b/intern/cycles/device/device_denoise.h
@@ -56,9 +56,6 @@ class DenoiseParams {
   /* Apply denoiser to image. */
   bool use = false;
 
-  /* Output denoising data passes (possibly without applying the denoiser). */
-  bool store_passes = false;
-
   /* Denoiser type. */
   DenoiserType type = DENOISER_OPENIMAGEDENOISE;
 
@@ -77,8 +74,8 @@ class DenoiseParams {
 
   bool modified(const DenoiseParams &other) const
   {
-    return !(use == other.use && store_passes == other.store_passes && type == 
other.type &&
-             start_sample == other.start_sample && use_pass_albedo == 
other.use_pass_albedo &&
+    return !(use == other.use && type == other.type && start_sample == 
other.start_sample &&
+             use_pass_albedo == other.use_pass_albedo &&
              use_pass_normal == other.use_pass_normal && prefilter == 
other.prefilter);
   }
 };
diff --git a/intern/cycles/render/denoising.cpp 
b/intern/cycles/render/denoising.cpp
index cfc517441ba..bcf8d3fa204 100644
--- a/intern/cycles/render/denoising.cpp
+++ b/intern/cycles/render/denoising.cpp
@@ -388,7 +388,6 @@ void DenoiseTask::create_task(DeviceTask &task)
   task.denoising = denoiser->params;
   task.denoising.type = DENOISER_NLM;
   task.denoising.use = true;
-  task.denoising.store_passes = false;
   task.denoising_from_render = false;
 
   task.denoising_frames.resize(neighbor_frames.size());
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 8390c136e11..52366d32b64 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -522,14 +522,11 @@ void Film::update_passes(Scene *scene)
 
   /* Create passes needed for denoising. */
   const bool use_denoise = integrator->get_use_denoise();
-  const bool denoise_store_passes = integrator->get_denoise_store_passes();
-  const bool add_denoised_passes = use_denoise || denoise_store_passes;
-  if (add_denoised_passes) {
-    if (denoise_store_passes || integrator->get_use_denoise_pass_normal()) {
+  if (use_denoise) {
+    if (integrator->get_use_denoise_pass_normal()) {
       add_auto_pass(scene, PASS_DENOISING_NORMAL);
     }
-
-    if (denoise_store_passes || integrator->get_use_denoise_pass_albedo()) {
+    if (integrator->get_use_denoise_pass_albedo()) {
       add_auto_pass(scene, PASS_DENOISING_ALBEDO);
     }
   }
@@ -562,7 +559,7 @@ void Film::update_passes(Scene *scene)
 
     /* NOTE: Enable all denoised passes when storage is requested.
      * This way it is possible to tweak denoiser parameters later on. */
-    if (info.support_denoise && add_denoised_passes) {
+    if (info.support_denoise && use_denoise) {
       add_auto_pass(scene, pass->type, PassMode::DENOISED);
     }
   }
@@ -716,8 +713,8 @@ uint Film::get_kernel_features(const Scene *scene) const
       continue;
     }
 
-    if ((pass->type == PASS_COMBINED && pass->mode == PassMode::DENOISED) ||
-        pass->type == PASS_DENOISING_NORMAL || pass->type == 
PASS_DENOISING_ALBEDO) {
+    if (pass->mode == PassMode::DENOISED || pass->type == 
PASS_DENOISING_NORMAL ||
+        pass->type == PASS_DENOISING_ALBEDO) {
       kernel_features |= KERNEL_FEATURE_DENOISING;
     }
 
diff --git a/intern/cycles/render/integrator.cpp 
b/intern/cycles/render/integrator.cpp
index d88bab0a4fe..55d86701701 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -94,8 +94,6 @@ NODE_DEFINE(Integrator)
   const DenoiseParams default_denoise_params;
 
   SOCKET_BOOLEAN(use_denoise, "Use Denoiser", default_denoise_params.use);
-  SOCKET_BOOLEAN(
-      denoise_store_passes, "Store Denoiser Passes", 
default_denoise_params.store_passes);
   SOCKET_ENUM(denoiser_type, "Denoiser Type", denoiser_type_enum, 
default_denoise_params.type);
   SOCKET_INT(denoise_start_sample, "Start Sample to Denoise", 
default_denoise_params.start_sample);
   SOCKET_BOOLEAN(use_denoise_pass_albedo,
@@ -307,8 +305,6 @@ DenoiseParams Integrator::get_denoise_params() const
 
   denoise_params.use = use_denoise;
 
-  denoise_params.store_passes = denoise_store_passes;
-
   denoise_params.type = denoiser_type;
 
   denoise_params.start_sample = denoise_start_sample;
diff --git a/intern/cycles/render/integrator.h 
b/intern/cycles/render/integrator.h
index 163574ed55b..32e108d62ca 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -77,7 +77,6 @@ class Integrator : public Node {
   NODE_SOCKET_API(SamplingPattern, sampling_pattern)
 
   NODE_SOCKET_API(bool, use_denoise);
-  NODE_SOCKET_API(bool, denoise_store_passes);
   NODE_SOCKET_API(DenoiserType, denoiser_type);
   NODE_SOCKET_API(int, denoise_start_sample);
   NODE_SOCKET_API(bool, use_denoise_pass_albedo);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to