Skip to content

Commit

Permalink
don't warn about hybrid render artifacts if light tracing is used
Browse files Browse the repository at this point in the history
  • Loading branch information
Theverat committed Sep 25, 2019
1 parent 2decedd commit 0257ff7
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions ui/render_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
from . import icons


def _show_hybrid_metropolis_warning(context):
config = context.scene.luxcore.config
opencl = context.scene.luxcore.opencl
return (config.engine == "PATH" and config.device == "OCL" and not config.path.hybridbackforward_enable
and config.sampler == "METROPOLIS" and opencl.use_native_cpu)


class LUXCORE_RENDER_PT_performance(RenderButtonsPanel, Panel):
COMPAT_ENGINES = {"LUXCORE"}
bl_label = "Performance"
Expand All @@ -20,12 +27,6 @@ def _draw_devices(self, layout, devices):
for device in devices:
layout.prop(device, "enabled", text=device.name)

def _show_hybrid_metropolis_warning(self, context):
config = context.scene.luxcore.config
opencl = context.scene.luxcore.opencl
return (config.engine == "PATH" and config.device == "OCL"
and config.sampler == "METROPOLIS" and opencl.use_native_cpu)

def _show_openCL_device_warning(self, context):
config = context.scene.luxcore.config
opencl = context.scene.luxcore.opencl
Expand All @@ -44,7 +45,7 @@ def draw_header(self, context):
opencl = context.scene.luxcore.opencl
layout = self.layout

if self._show_hybrid_metropolis_warning(context):
if _show_hybrid_metropolis_warning(context):
self.layout.label(text="", icon=icons.WARNING)

if self._show_openCL_device_warning(context):
Expand Down Expand Up @@ -81,12 +82,6 @@ def poll(cls, context):
config = context.scene.luxcore.config
return context.scene.render.engine == "LUXCORE" and config.engine == "PATH" and config.device == "OCL"

def _show_hybrid_metropolis_warning(self, context):
config = context.scene.luxcore.config
opencl = context.scene.luxcore.opencl
return (config.engine == "PATH" and config.device == "OCL"
and config.sampler == "METROPOLIS" and opencl.use_native_cpu)

def draw_header(self, context):
opencl = context.scene.luxcore.opencl
layout = self.layout
Expand All @@ -108,7 +103,7 @@ def draw(self, context):
sub.enabled = context.scene.render.threads_mode == 'FIXED'
sub.prop(context.scene.render, "threads")

if self._show_hybrid_metropolis_warning(context):
if _show_hybrid_metropolis_warning(context):
col = layout.column(align=True)
col.label(text="CPU should be disabled if Metropolis", icon=icons.WARNING)
col.label(text="sampler is used (can cause artifacts)")
Expand Down

0 comments on commit 0257ff7

Please sign in to comment.