[Bf-blender-cvs] [ccd291aafbe] blender2.7: Cycles: Fix uninitialized number of hits
Sergey Sharybin
noreply at git.blender.org
Wed Feb 20 23:20:16 CET 2019
Commit: ccd291aafbe5f0478963dc6e7f6b957a08eea511
Author: Sergey Sharybin
Date: Wed Feb 20 23:15:21 2019 +0100
Branches: blender2.7
https://developer.blender.org/rBccd291aafbe5f0478963dc6e7f6b957a08eea511
Cycles: Fix uninitialized number of hits
Was happening when looking for all intersections for transparent shadow rays
in the case the ray is degenerate.
Still quesitonable whether we should consider this a transparent or opaque
configuraiton. Ideally, we should prevent such rays from happening, but that
is another vector of debugging.
===================================================================
M intern/cycles/kernel/bvh/bvh.h
===================================================================
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index 284b1e9208c..d123c6dc7c8 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -334,6 +334,7 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
PROFILING_INIT(kg, PROFILING_INTERSECT_SHADOW_ALL);
if(!scene_intersect_valid(ray)) {
+ *num_hits = 0;
return false;
}
# ifdef __EMBREE__
More information about the Bf-blender-cvs
mailing list