From cc951726673e0e7e9969ce83f90efdabde289791 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 12 Oct 2016 12:12:28 +0200 Subject: Cycles: Fix use of uninitialized variable in SSS When ray hits curve segment with SSS shader it was possible to have uninitialized hit_P variable used for sampling. Seems that was a reason of our headache of difference between AVX2 and SSE4 render results here, so now we can revert all the nasty ifdef-ed inline policies. --- intern/cycles/kernel/kernel_subsurface.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'intern/cycles/kernel/kernel_subsurface.h') diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h index 1575fa4e2db..955aa8a346f 100644 --- a/intern/cycles/kernel/kernel_subsurface.h +++ b/intern/cycles/kernel/kernel_subsurface.h @@ -330,6 +330,10 @@ int subsurface_scatter_multi_intersect( verts); } #endif /* __OBJECT_MOTION__ */ + else { + ss_isect->weight[hit] = make_float3(0.0f, 0.0f, 0.0f); + continue; + } float3 hit_Ng = ss_isect->Ng[hit]; if(ss_isect->hits[hit].object != OBJECT_NONE) { -- cgit v1.2.3