diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-06-01 01:11:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-06-24 16:17:36 +0300 |
commit | 669befdfbe487f76c65f54e3da0013d140d56893 (patch) | |
tree | 9aa766cca084b9d65fbc694f5fa0a08cbcbcce70 /intern/cycles/device/device.cpp | |
parent | 0a3bde63006c66b8b8531ed5eccca9bdf5e5dc20 (diff) |
Cycles: add Intel OpenImageDenoise support for viewport denoising
Compared to Optix denoise, this is usually slower since there is no GPU
acceleration. Some optimizations may still be possible, in avoid copies
to the GPU and/or denoising less often.
The main thing is that this adds viewport denoising support for computers
without an NVIDIA GPU (as long as the CPU supports SSE 4.1, which is nearly
all of them).
Ref T76259
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r-- | intern/cycles/device/device.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index 73415d5f9c6..9dbb33980b4 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -706,6 +706,18 @@ void DeviceInfo::add_denoising_devices(DenoiserType denoiser_type) denoisers = denoiser_type; } } + else if (denoiser_type == DENOISER_OPENIMAGEDENOISE && type != DEVICE_CPU) { + /* Convert to a special multi device with separate denoising devices. */ + if (multi_devices.empty()) { + multi_devices.push_back(*this); + } + + /* Add CPU denoising devices. */ + DeviceInfo cpu_device = Device::available_devices(DEVICE_MASK_CPU).front(); + denoising_devices.push_back(cpu_device); + + denoisers = denoiser_type; + } } CCL_NAMESPACE_END |