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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-01-22 14:38:27 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-22 14:39:11 +0300
commitc3237cdc13925db9e3e6865efb9570c7a1f214ce (patch)
tree4dea4587e16dd9caf81e0297df069f7dca87afbd
parent417170159a683d1ffd62393d49fe5975712c2c10 (diff)
Fix T53012: Shadow catcher creates artifacts on contact area
The issue was caused by light sample being evaluated to nan at some point. This is root of the cause which is to be fixed, but is very hard to trace down especially via ssh (the issue only happens on AVX2 release build). Will give it a closer look when back to my AVX2 machine. For until then this is a good check to have anyway, it corresponds to what's happening in regular radiance sum.
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index 9ed16aceb55..a290b13f9da 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -668,6 +668,10 @@ ccl_device_inline float path_radiance_sum_shadow(const PathRadiance *L)
{
float path_total = average(L->path_total);
float path_total_shaded = average(L->path_total_shaded);
+ if(UNLIKELY(!isfinite_safe(path_total))) {
+ kernel_assert(!"Non-finite total radiance along the path");
+ return 0.0f;
+ }
if(path_total != 0.0f) {
return path_total_shaded / path_total;
}