[Bf-blender-cvs] [9e57bab] master: Cycles: Fix really bad bug with shadow rays on non-SSE CPUs
Sergey Sharybin
noreply at git.blender.org
Thu Dec 25 10:31:50 CET 2014
Commit: 9e57babd8d946317feb5dbd7601ae01bb68d3130
Author: Sergey Sharybin
Date: Thu Dec 25 14:30:05 2014 +0500
Branches: master
https://developer.blender.org/rB9e57babd8d946317feb5dbd7601ae01bb68d3130
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 d605602..3c40528 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
More information about the Bf-blender-cvs
mailing list