diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-10-12 13:12:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-10-12 13:12:28 +0300 |
commit | cc951726673e0e7e9969ce83f90efdabde289791 (patch) | |
tree | 7dbb02f196ecab6a89d39d2146420669f60c0568 /intern | |
parent | edd9d89673f7f737d367fca5a896e478f6ff66f4 (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_subsurface.h | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |