diff options
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 703fcc2078b..a6050b66040 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -531,7 +531,7 @@ int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass) { string name = b_pass.name(); - if(name == "Noisy Image") return DENOISING_PASS_COLOR; + if(name == "Noisy Image") return DENOISING_PASS_PREFILTERED_COLOR; if(name.substr(0, 10) != "Denoising ") { return -1; @@ -539,15 +539,12 @@ int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass) name = name.substr(10); #define MAP_PASS(passname, offset) if(name == passname) return offset; - MAP_PASS("Normal", DENOISING_PASS_NORMAL); - MAP_PASS("Normal Variance", DENOISING_PASS_NORMAL_VAR); - MAP_PASS("Albedo", DENOISING_PASS_ALBEDO); - MAP_PASS("Albedo Variance", DENOISING_PASS_ALBEDO_VAR); - MAP_PASS("Depth", DENOISING_PASS_DEPTH); - MAP_PASS("Depth Variance", DENOISING_PASS_DEPTH_VAR); - MAP_PASS("Shadow A", DENOISING_PASS_SHADOW_A); - MAP_PASS("Shadow B", DENOISING_PASS_SHADOW_B); - MAP_PASS("Image Variance", DENOISING_PASS_COLOR_VAR); + MAP_PASS("Normal", DENOISING_PASS_PREFILTERED_NORMAL); + MAP_PASS("Albedo", DENOISING_PASS_PREFILTERED_ALBEDO); + MAP_PASS("Depth", DENOISING_PASS_PREFILTERED_DEPTH); + MAP_PASS("Shadowing", DENOISING_PASS_PREFILTERED_SHADOWING); + MAP_PASS("Variance", DENOISING_PASS_PREFILTERED_VARIANCE); + MAP_PASS("Intensity", DENOISING_PASS_PREFILTERED_INTENSITY); MAP_PASS("Clean", DENOISING_PASS_CLEAN); #undef MAP_PASS @@ -579,10 +576,11 @@ vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay, } PointerRNA crp = RNA_pointer_get(&b_srlay.ptr, "cycles"); - bool use_denoising = get_boolean(crp, "use_denoising"); - bool store_denoising_passes = get_boolean(crp, "denoising_store_passes"); + bool full_denoising = get_boolean(crp, "use_denoising"); + bool write_denoising_passes = get_boolean(crp, "denoising_store_passes"); + scene->film->denoising_flags = 0; - if(use_denoising || store_denoising_passes) { + if(full_denoising || write_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); @@ -596,16 +594,13 @@ vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay, b_engine.add_pass("Noisy Image", 4, "RGBA", b_srlay.name().c_str()); } - if(store_denoising_passes) { + if(write_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()); + b_engine.add_pass("Denoising Shadowing", 1, "X", b_srlay.name().c_str()); + b_engine.add_pass("Denoising Variance", 3, "RGB", b_srlay.name().c_str()); + b_engine.add_pass("Denoising Intensity", 1, "X", 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()); |