Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2019-05-31 23:38:50 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2019-06-01 01:45:03 +0300
commitcc600de6695a241dd9b0de275656b5a7459552dc (patch)
tree6111f7469b75ae24a4a93a8109af3c3d233db722 /intern/cycles/device
parentd5b813301a81a7ec13996dfcb3a9bc88f56e4018 (diff)
Cycles Denoising: Get rid of halos around bright edges
Previously, bright edges (e.g. caused by rim lighting) would sometimes get halos around them after denoising. This change introduces a log(1+x) highlight compression step that is performed before denoising and reversed afterwards. That way, the denoising algorithm itself operates in the compressed space and therefore bright edges cause less numerical issues.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device_denoising.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/device/device_denoising.cpp b/intern/cycles/device/device_denoising.cpp
index 55548c98b97..ac17c02a427 100644
--- a/intern/cycles/device/device_denoising.cpp
+++ b/intern/cycles/device/device_denoising.cpp
@@ -214,12 +214,12 @@ void DenoisingTask::prefilter_color()
int num_color_passes = 3;
device_only_memory<float> temporary_color(device, "denoising temporary color");
- temporary_color.alloc_to_device(3 * buffer.pass_stride, false);
+ temporary_color.alloc_to_device(6 * buffer.pass_stride, false);
for (int pass = 0; pass < num_color_passes; pass++) {
device_sub_ptr color_pass(temporary_color, pass * buffer.pass_stride, buffer.pass_stride);
device_sub_ptr color_var_pass(
- buffer.mem, variance_to[pass] * buffer.pass_stride, buffer.pass_stride);
+ temporary_color, (pass + 3) * buffer.pass_stride, buffer.pass_stride);
functions.get_feature(mean_from[pass],
variance_from[pass],
*color_pass,