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.
This commit is contained in:
Sergey Sharybin 2019-02-20 23:15:21 +01:00
parent 848f589fdf
commit ccd291aafb
Notes: blender-bot 2023-02-14 07:39:44 +01:00
Referenced by issue #61784, Grease pencil viewport bug in brand new scenes
Referenced by issue #61772, Particle system crash during animation after switching particle settings (near MEM_lockfree_reallocN_id)
1 changed files with 1 additions and 0 deletions

View File

@ -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__