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>2017-05-20 00:04:13 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-05-20 00:31:49 +0300
commit3dee1f079f3ac84a649dda90f920610681ffb52d (patch)
treef1dda619129ca9befbe28c15aa3e71f0409ec54f /intern/cycles/util
parent177385dc439b4f6b478a033413a8df992e7f5ed3 (diff)
Fix T51560: Black pixels on a denoising render
Once again, numerical instabilities causing the Cholesky decomposition to fail. However, further increasing the diagonal correction just because of a few pixels in very specific scenes and settings seems unjustified. Therefore, this commit simply falls back to the basic NLM-filtered pixel if the more advanced model fails.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_math_float3.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math_float3.h b/intern/cycles/util/util_math_float3.h
index a754be413fe..5327d9f7cc6 100644
--- a/intern/cycles/util/util_math_float3.h
+++ b/intern/cycles/util/util_math_float3.h
@@ -367,6 +367,11 @@ ccl_device_inline bool isequal_float3(const float3 a, const float3 b)
#endif
}
+ccl_device_inline bool isfinite3_safe(float3 v)
+{
+ return isfinite_safe(v.x) && isfinite_safe(v.y) && isfinite_safe(v.z);
+}
+
ccl_device_inline float3 ensure_finite3(float3 v)
{
if(!isfinite_safe(v.x)) v.x = 0.0;