Cycles: Fix occasional black pixels from denoising with excessive radii

Numerical inaccuracies would cause the XtWX matrix to be no longer
positive-semidefinite, which in turn caused the LSQ solver to fail.
This commit is contained in:
Lukas Stockner
2017-05-08 22:09:35 +02:00
parent f4b7c33c1a
commit 58a0c27546
3 changed files with 6 additions and 3 deletions

View File

@@ -364,7 +364,7 @@ ccl_device_inline void kernel_write_result(KernelGlobals *kg, ccl_global float *
}
else {
kernel_write_pass_float3_variance(buffer + kernel_data.film.pass_denoising_data + DENOISING_PASS_COLOR,
sample, L_sum);
sample, ensure_finite3(L_sum));
}
kernel_write_pass_float3_variance(buffer + kernel_data.film.pass_denoising_data + DENOISING_PASS_NORMAL,