[Bf-blender-cvs] [ab3a6e050c8] master: Fix artifacts with Cycles viewport denoising when rendering with multiple CUDA devices

Patrick Mours noreply at git.blender.org
Mon Feb 17 16:21:10 CET 2020


Commit: ab3a6e050c856345d10f8e36155913288559e4dc
Author: Patrick Mours
Date:   Mon Feb 17 16:15:56 2020 +0100
Branches: master
https://developer.blender.org/rBab3a6e050c856345d10f8e36155913288559e4dc

Fix artifacts with Cycles viewport denoising when rendering with multiple CUDA devices

Rendering with multiple CUDA devices but denoising with OptiX caused parts of the image to go
missing at the start while the resolution was scaled. This is because the copy operation in
`MultiDevice::map_neighbor_tiles` which slices the copy across all devices would slice based on the
full resolution and not the scaled one and therefore copy incorrect data between devices.
Since this is not the recommended way of using viewport denoising anyway, simply avoid those
incorrect copies for now by disabling denoising while the resolution is scaled. Doing both rendering
and denoising with OptiX is not affected by this, since it avoids those copies altogether anyway.

===================================================================

M	intern/cycles/render/session.cpp

===================================================================

diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index b41844cb132..acf9ca68889 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -1115,6 +1115,13 @@ void Session::denoise()
     return;
   }
 
+  /* Cannot denoise with resolution divider and separate denoising devices.
+   * It breaks the copy in 'MultiDevice::map_neighbor_tiles' (which operates on the full buffer
+   * dimensions and not the scaled ones). */
+  if (!params.device.denoising_devices.empty() && tile_manager.state.resolution_divider > 1) {
+    return;
+  }
+
   /* Add separate denoising task. */
   DeviceTask task(DeviceTask::DENOISE);



More information about the Bf-blender-cvs mailing list