From ccd291aafbe5f0478963dc6e7f6b957a08eea511 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 20 Feb 2019 23:15:21 +0100 Subject: 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. --- intern/cycles/kernel/bvh/bvh.h | 1 + 1 file changed, 1 insertion(+) (limited to 'intern') 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__ -- cgit v1.2.3