diff options
Diffstat (limited to 'intern/cycles/kernel/filter/filter_reconstruction.h')
-rw-r--r-- | intern/cycles/kernel/filter/filter_reconstruction.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/filter/filter_reconstruction.h b/intern/cycles/kernel/filter/filter_reconstruction.h index 02f3802fa0c..6a7c86e4012 100644 --- a/intern/cycles/kernel/filter/filter_reconstruction.h +++ b/intern/cycles/kernel/filter/filter_reconstruction.h @@ -54,7 +54,10 @@ ccl_device_inline void kernel_filter_construct_gramian(int x, int y, float p_std_dev = sqrtf(filter_get_pixel_variance(variance_pass + p_offset, pass_stride)); float q_std_dev = sqrtf(filter_get_pixel_variance(variance_pass + q_offset, pass_stride)); - if(average(fabs(p_color - q_color)) > 3.0f*(p_std_dev + q_std_dev + 1e-3f)) { + /* If the pixel was flagged as an outlier during prefiltering, skip it. + * Otherwise, perform the regular confidence interval test. */ + if(ccl_get_feature(buffer + q_offset, 0) < 0.0f || + average(fabs(p_color - q_color)) > 2.0f*(p_std_dev + q_std_dev + 1e-3f)) { return; } |