diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-12 11:06:20 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-12 11:06:46 +0300 |
commit | 34c3beb339256005c726ae9a098624c5308f54b0 (patch) | |
tree | b7df3dc871a6b1903be442837ee7d32d4066a742 | |
parent | 520fb5c8cd3d57e6c2b5676aae73008a1a038300 (diff) |
Cycles: Fix missing node distance update when only two child intersected in QBVH
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_traversal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/kernel/geom/geom_qbvh_traversal.h b/intern/cycles/kernel/geom/geom_qbvh_traversal.h index be7519d0cff..7e356ea062b 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_traversal.h +++ b/intern/cycles/kernel/geom/geom_qbvh_traversal.h @@ -186,6 +186,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, if(traverseChild == 0) { if(d1 < d0) { nodeAddr = c1; + nodeDist = d1; ++stackPtr; kernel_assert(stackPtr < BVH_QSTACK_SIZE); traversalStack[stackPtr].addr = c0; @@ -194,6 +195,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, } else { nodeAddr = c0; + nodeDist = d0; ++stackPtr; kernel_assert(stackPtr < BVH_QSTACK_SIZE); traversalStack[stackPtr].addr = c1; |