diff options
author | Patrick Mours <pmours@nvidia.com> | 2020-02-11 18:30:01 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2020-02-11 20:03:43 +0300 |
commit | 38589de10c098cfe32ac7716f4d7844abf959753 (patch) | |
tree | d28b007bdc75e4eefd1d7ded5115655c50a72140 /intern/cycles/device/device_memory.h | |
parent | 35490c3ead03d472dbcba36c85d428e81b442520 (diff) |
Cycles: Add support for denoising in the viewport
The OptiX denoiser can be a great help when rendering in the viewport, since it is really fast
and needs few samples to produce convincing results. This patch therefore adds support for
using any Cycles denoiser in the viewport also (but only the OptiX one is selectable because
the NLM one is too slow to be usable currently). It also adds support for denoising on a
different device than rendering (so one can e.g. render with the CPU but denoise with OptiX).
Reviewed By: #cycles, brecht
Differential Revision: https://developer.blender.org/D6554
Diffstat (limited to 'intern/cycles/device/device_memory.h')
-rw-r--r-- | intern/cycles/device/device_memory.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h index 60740807568..2949773ef0c 100644 --- a/intern/cycles/device/device_memory.h +++ b/intern/cycles/device/device_memory.h @@ -427,6 +427,11 @@ template<typename T> class device_vector : public device_memory { device_copy_to(); } + void copy_from_device() + { + device_copy_from(0, data_width, data_height, sizeof(T)); + } + void copy_from_device(int y, int w, int h) { device_copy_from(y, w, h, sizeof(T)); |