diff --git a/export/imagepipeline.py b/export/imagepipeline.py index 532708b1..ccbe4cc1 100644 --- a/export/imagepipeline.py +++ b/export/imagepipeline.py @@ -38,31 +38,32 @@ def convert_defs(context, scene, definitions, plugin_index, define_radiancescale if pipeline.tonemapper.enabled: index = convert_tonemapper(definitions, index, pipeline.tonemapper) - # Note: Blender expects the alpha to be NOT premultiplied, so we only - # premultiply it when the backgroundimage plugin is used - if use_backgroundimage(context, scene): - index = _premul_alpha(definitions, index) + if not (context and scene.luxcore.viewport.denoise): + # Note: Blender expects the alpha to be NOT premultiplied, so we only + # premultiply it when the backgroundimage plugin is used + if use_backgroundimage(context, scene): + index = _premul_alpha(definitions, index) - if use_backgroundimage(context, scene): - index = _backgroundimage(definitions, index, pipeline.backgroundimage, scene) + if use_backgroundimage(context, scene): + index = _backgroundimage(definitions, index, pipeline.backgroundimage, scene) - if pipeline.mist.enabled: - index = _mist(definitions, index, pipeline.mist, scene) + if pipeline.mist.enabled: + index = _mist(definitions, index, pipeline.mist, scene) - if pipeline.bloom.enabled: - index = _bloom(definitions, index, pipeline.bloom) + if pipeline.bloom.enabled: + index = _bloom(definitions, index, pipeline.bloom) - if pipeline.coloraberration.enabled: - index = _coloraberration(definitions, index, pipeline.coloraberration) + if pipeline.coloraberration.enabled: + index = _coloraberration(definitions, index, pipeline.coloraberration) - if pipeline.vignetting.enabled: - index = _vignetting(definitions, index, pipeline.vignetting) + if pipeline.vignetting.enabled: + index = _vignetting(definitions, index, pipeline.vignetting) - if pipeline.camera_response_func.enabled: - index = _camera_response_func(definitions, index, pipeline.camera_response_func, scene) + if pipeline.camera_response_func.enabled: + index = _camera_response_func(definitions, index, pipeline.camera_response_func, scene) - if pipeline.contour_lines.enabled: - index = _contour_lines(definitions, index, pipeline.contour_lines) + if pipeline.contour_lines.enabled: + index = _contour_lines(definitions, index, pipeline.contour_lines) if use_filesaver: # Needs gamma correction (Blender applies it for us, diff --git a/properties/viewport.py b/properties/viewport.py index 2af47c89..f0f66bec 100644 --- a/properties/viewport.py +++ b/properties/viewport.py @@ -48,4 +48,6 @@ class LuxCoreViewportSettings(bpy.types.PropertyGroup): "the RT Path engine is used in the viewport, which is optimized " "for quick feedback but can't handle complex light paths") - denoise = BoolProperty(name="Denoise", default=True) + denoise = BoolProperty(name="Denoise", default=True, + description="Denoise the viewport render once the halt time is reached. " + "Note that this disables most imagepipeline plugins in the viewport") diff --git a/ui/camera.py b/ui/camera.py index 2f764b69..8fa67192 100644 --- a/ui/camera.py +++ b/ui/camera.py @@ -128,6 +128,9 @@ def draw(self, context): msg = name + " and multiple renderlayers will cause brightness difference!" box.label(msg, icon=icons.WARNING) + if context.scene.luxcore.viewport.denoise: + layout.label("Plugins below disabled in viewport because of viewport denoising", icon=icons.INFO) + # Bloom settings bloom = pipeline.bloom box = self.draw_plugin_box(bloom)