diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-25 12:30:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-25 12:30:05 +0300 |
commit | 9e57babd8d946317feb5dbd7601ae01bb68d3130 (patch) | |
tree | 3bafc4eb191a07fcd72f6b0f50258cb0c88b6d89 /intern | |
parent | fe06ec82a91a508b953e14277a97323a6eea901e (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh_shadow.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/intern/cycles/kernel/geom/geom_bvh_shadow.h b/intern/cycles/kernel/geom/geom_bvh_shadow.h index d6056026f24..3c405284b4d 100644 --- a/intern/cycles/kernel/geom/geom_bvh_shadow.h +++ b/intern/cycles/kernel/geom/geom_bvh_shadow.h @@ -305,15 +305,14 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg, triangle_intersect_precalc(dir, &isect_precalc); 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 @@ -356,15 +355,15 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg, triangle_intersect_precalc(dir, &isect_precalc); } + 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 |