Cycles Denoising: Add more failsafes for invalid pixels
authorLukas Stockner <lukas.stockner@freenet.de>
Sat, 10 Jun 2017 23:44:06 +0000 (01:44 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Sat, 10 Jun 2017 23:51:39 +0000 (01:51 +0200)
commit558bea225296751b849572122d6202b4ab1fa1cf
tree03a7269235f5055b70ab2f292c3900fd2e22904c
parent0dd6e5bfee3dee0ced75e9cb03e950627b59e75e
Cycles Denoising: Add more failsafes for invalid pixels

Now, when there is no usable neighboring pixel for denoising, the noisy value
is preserved instead of producing a NaN.
Also, negative results are clamped to zero.

Note that there are just workarounds that don't fix the underlying problems,
but these issues are very rare and I'm not sure if it's even possible to fix
the underlying problems without introducing a significant slowdown or quality
decrease in other situations.
Because of that and since 2.79 is happening very soon, I just went for these
workarounds for now.
intern/cycles/kernel/filter/filter_reconstruction.h