[Bf-blender-cvs] [f1ab8f8] blender-v2.73-release: Cycles: Fix really bad bug with shadow rays on non-SSE CPUs

Sergey Sharybin noreply at git.blender.org
Tue Jan 6 10:44:32 CET 2015


Commit: f1ab8f89306c365e9075fbac6931e312bf92b93b
Author: Sergey Sharybin
Date:   Thu Dec 25 14:30:05 2014 +0500
Branches: blender-v2.73-release
https://developer.blender.org/rBf1ab8f89306c365e9075fbac6931e312bf92b93b

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.

===================================================================

M	intern/cycles/kernel/geom/geom_bvh_shadow.h

===================================================================

diff --git a/intern/cycles/kernel/geom/geom_bvh_shadow.h b/intern/cycles/kernel/geom/geom_bvh_shadow.h
index aee4097..7606c38 100644
--- a/intern/cycles/kernel/geom/geom_bvh_shadow.h
+++ b/intern/cycles/kernel/geom/geom_bvh_shadow.h
@@ -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




More information about the Bf-blender-cvs mailing list