Cycles: Fix really bad bug with shadow rays on non-SSE CPUs

basically shadow rays were totally broken and most of the time did not record
any intersections, leading to really ad rendering artifacts.

This commit makes it so regardless of enabled optimization level render result
would be the same.
This commit is contained in:
Sergey Sharybin 2014-12-25 14:30:05 +05:00
parent 3fcc5520fd
commit f1ab8f8930
1 changed files with 4 additions and 5 deletions

View File

@ -296,15 +296,14 @@ ccl_device bool BVH_FUNCTION_NAME
#endif
num_hits_in_instance = 0;
isect_array->t = isect_t;
#if defined(__KERNEL_SSE2__)
Psplat[0] = ssef(P.x);
Psplat[1] = ssef(P.y);
Psplat[2] = ssef(P.z);
isect_array->t = isect_t;
tsplat = ssef(0.0f, 0.0f, -isect_t, -isect_t);
gen_idirsplat_swap(pn, shuf_identity, shuf_swap, idir, idirsplat, shufflexyz);
#endif
@ -344,15 +343,15 @@ ccl_device bool BVH_FUNCTION_NAME
#endif
}
isect_t = tmax;
isect_array->t = isect_t;
#if defined(__KERNEL_SSE2__)
Psplat[0] = ssef(P.x);
Psplat[1] = ssef(P.y);
Psplat[2] = ssef(P.z);
isect_t = tmax;
isect_array->t = isect_t;
tsplat = ssef(0.0f, 0.0f, -isect_t, -isect_t);
gen_idirsplat_swap(pn, shuf_identity, shuf_swap, idir, idirsplat, shufflexyz);
#endif