diff options
Diffstat (limited to 'intern')
-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; |