Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2018-10-29 17:45:58 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-10-29 17:50:01 +0300
commite3817e5ec179f24b18d58ac60fe0b0969887544e (patch)
tree70c8e61523e8fc113de2d4f1b7bcfc1522fed5c6 /intern/cycles/blender/blender_sync.cpp
parent17d91bcb611b7191cc2d0dfe4b77e07917634aa9 (diff)
Cycles: Support generating Denoising passes without actually denoising
Needed for the animation denoiser since the denoising filter is done separately there. Reviewers: brecht, sergey Reviewed By: brecht Differential Revision: https://developer.blender.org/D3833
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r--intern/cycles/blender/blender_sync.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 076734d105f..70bb6de8b1d 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -578,10 +578,11 @@ vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
Pass::add(pass_type, passes);
}
- scene->film->denoising_flags = 0;
PointerRNA crp = RNA_pointer_get(&b_srlay.ptr, "cycles");
- if(get_boolean(crp, "use_denoising"))
- {
+ bool use_denoising = get_boolean(crp, "use_denoising");
+ bool store_denoising_passes = get_boolean(crp, "denoising_store_passes");
+ scene->film->denoising_flags = 0;
+ if(use_denoising || store_denoising_passes) {
#define MAP_OPTION(name, flag) if(!get_boolean(crp, name)) scene->film->denoising_flags |= flag;
MAP_OPTION("denoising_diffuse_direct", DENOISING_CLEAN_DIFFUSE_DIR);
MAP_OPTION("denoising_diffuse_indirect", DENOISING_CLEAN_DIFFUSE_IND);
@@ -592,22 +593,22 @@ vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
MAP_OPTION("denoising_subsurface_direct", DENOISING_CLEAN_SUBSURFACE_DIR);
MAP_OPTION("denoising_subsurface_indirect", DENOISING_CLEAN_SUBSURFACE_IND);
#undef MAP_OPTION
-
b_engine.add_pass("Noisy Image", 4, "RGBA", b_srlay.name().c_str());
- if(get_boolean(crp, "denoising_store_passes")) {
- b_engine.add_pass("Denoising Normal", 3, "XYZ", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Normal Variance", 3, "XYZ", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Albedo", 3, "RGB", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Albedo Variance", 3, "RGB", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Depth", 1, "Z", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Depth Variance", 1, "Z", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Shadow A", 3, "XYV", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Shadow B", 3, "XYV", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Image Variance", 3, "RGB", b_srlay.name().c_str());
-
- if(scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES) {
- b_engine.add_pass("Denoising Clean", 3, "RGB", b_srlay.name().c_str());
- }
+ }
+
+ if(store_denoising_passes) {
+ b_engine.add_pass("Denoising Normal", 3, "XYZ", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Normal Variance", 3, "XYZ", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Albedo", 3, "RGB", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Albedo Variance", 3, "RGB", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Depth", 1, "Z", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Depth Variance", 1, "Z", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Shadow A", 3, "XYV", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Shadow B", 3, "XYV", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Image Variance", 3, "RGB", b_srlay.name().c_str());
+
+ if(scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES) {
+ b_engine.add_pass("Denoising Clean", 3, "RGB", b_srlay.name().c_str());
}
}
#ifdef __KERNEL_DEBUG__