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>2017-10-06 15:27:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-10-06 15:27:34 +0300
commita950af8e24dd22e93bbf13a7931c175d0037df66 (patch)
treeee6b42776323737a7fccbd5087b8678355c67549 /intern/cycles/kernel
parent0d3c8d07016d7a203c61ca35bb43d149e01dd0d7 (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.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index ae5f6e5e070..366f25422fd 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -557,7 +557,11 @@ ccl_device_inline void path_radiance_sum_shadowcatcher(KernelGlobals *kg,
float path_total = average(L->path_total);
float shadow;
- if(path_total == 0.0f) {
+ if(UNLIKELY(!isfinite_safe(path_total))) {
+ kernel_assert(!"Non-finite total radiance along the path");
+ shadow = 0.0f;
+ }
+ else if(path_total == 0.0f) {
shadow = L->shadow_transparency;
}
else {