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
path: root/intern
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2021-02-22 20:09:48 +0300
committerPatrick Mours <pmours@nvidia.com>2021-02-23 13:45:02 +0300
commitb2e1b13abde787c2aad97d5c317357cf84360bdb (patch)
treeb41167fb077b632b29885cf9599022beaf77a758 /intern
parentbfb2e87a9ea0d8490cb5faec4d0d8a7066f0093a (diff)
Cycles: Add option to change input passes for viewport denoising
There are cases where the default input passes of color+albedo do not yield useful results and while this was possible to change that for final frame rendering (in the layer settings), viewport denoising always used a fixed color+albedo. This adds an option to change the input passes for viewport denoising too, so that one can use it in scenes that otherwise wouldn't work well with it. Reviewed By: brecht Differential Revision: https://developer.blender.org/D10404
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/properties.py7
-rw-r--r--intern/cycles/blender/addon/ui.py5
-rw-r--r--intern/cycles/blender/blender_sync.cpp3
3 files changed, 14 insertions, 1 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 0708c371a0e..dc4437bdc52 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -646,6 +646,12 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
min=0, max=(1 << 24),
default=1,
)
+ preview_denoising_input_passes: EnumProperty(
+ name="Viewport Input Passes",
+ description="Passes used by the denoiser to distinguish noise from shader and geometry detail",
+ items=enum_denoising_input_passes,
+ default='RGB_ALBEDO',
+ )
debug_reset_timeout: FloatProperty(
name="Reset timeout",
@@ -1434,7 +1440,6 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
items=enum_denoising_input_passes,
default='RGB_ALBEDO',
)
-
denoising_openimagedenoise_input_passes: EnumProperty(
name="Input Passes",
description="Passes used by the denoiser to distinguish noise from shader and geometry detail",
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 68f6291b373..c9b4dc25cf2 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -275,6 +275,8 @@ class CYCLES_RENDER_PT_sampling_denoising(CyclesButtonsPanel, Panel):
sub.prop(cscene, "denoiser", text="")
+ layout.separator()
+
heading = layout.column(align=False, heading="Viewport")
row = heading.row(align=True)
row.prop(cscene, "use_preview_denoising", text="")
@@ -285,6 +287,9 @@ class CYCLES_RENDER_PT_sampling_denoising(CyclesButtonsPanel, Panel):
sub = heading.row(align=True)
sub.active = cscene.use_preview_denoising
sub.prop(cscene, "preview_denoising_start_sample", text="Start Sample")
+ sub = heading.row(align=True)
+ sub.active = cscene.use_preview_denoising
+ sub.prop(cscene, "preview_denoising_input_passes", text="Input Passes")
class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index b6a5f67ec2d..0e61f4f2615 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -1005,6 +1005,9 @@ DenoiseParams BlenderSync::get_denoise_params(BL::Scene &b_scene,
cscene, "preview_denoiser", DENOISER_NUM, DENOISER_NONE);
denoising.start_sample = get_int(cscene, "preview_denoising_start_sample");
+ denoising.input_passes = (DenoiserInput)get_enum(
+ cscene, "preview_denoising_input_passes", DENOISER_INPUT_NUM, (int)denoising.input_passes);
+
/* Auto select fastest denoiser. */
if (denoising.type == DENOISER_NONE) {
if (!Device::available_devices(DEVICE_MASK_OPTIX).empty()) {