Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-30 20:29:26 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-30 20:29:26 +0400
commitb6021462a8855a2ae1ecd03f61014060c3702888 (patch)
tree0e188406a845e59c09aca4dd1e43a64ffb33224a /intern
parentaf5adbad3f48f8ebbc73ecd31db9bcf74bd5a657 (diff)
Another possible fix for #29301: issue with BVH intersection, reorder code a
bit so that it's more symmetric and resulting float ops are compiled the same way. Otherwise extended float precision being used in one place and not the other can make comparisons fail.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_bvh.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h
index e98bb158f6e..04150b7ea90 100644
--- a/intern/cycles/kernel/kernel_bvh.h
+++ b/intern/cycles/kernel/kernel_bvh.h
@@ -94,11 +94,11 @@ __device_inline void bvh_node_intersect(KernelGlobals *kg,
float c0hiy = n0xy.w * idir.y - ood.y;
float c0loz = nz.x * idir.z - ood.z;
float c0hiz = nz.y * idir.z - ood.z;
- float c1loz = nz.z * idir.z - ood.z;
- float c1hiz = nz.w * idir.z - ood.z;
-
float c0min = max4(min(c0lox, c0hix), min(c0loy, c0hiy), min(c0loz, c0hiz), 0.0f);
float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t);
+
+ float c1loz = nz.z * idir.z - ood.z;
+ float c1hiz = nz.w * idir.z - ood.z;
float c1lox = n1xy.x * idir.x - ood.x;
float c1hix = n1xy.y * idir.x - ood.x;
float c1loy = n1xy.z * idir.y - ood.y;