diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_bvh.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h index ace48f4a1a2..b44e1194672 100644 --- a/intern/cycles/kernel/kernel_bvh.h +++ b/intern/cycles/kernel/kernel_bvh.h @@ -1075,6 +1075,11 @@ __device_inline int bvh_intersect_subsurface(KernelGlobals *kg, const Ray *ray, nodeAddr = kernel_tex_fetch(__object_node, object); } + else { + /* pop */ + nodeAddr = traversalStack[stackPtr]; + --stackPtr; + } } #endif } @@ -1204,6 +1209,11 @@ __device bool bvh_intersect_motion_subsurface(KernelGlobals *kg, const Ray *ray, nodeAddr = kernel_tex_fetch(__object_node, object); } + else { + /* pop */ + nodeAddr = traversalStack[stackPtr]; + --stackPtr; + } } } } while(nodeAddr != ENTRYPOINT_SENTINEL); @@ -1235,8 +1245,6 @@ __device_inline int scene_intersect_subsurface(KernelGlobals *kg, const Ray *ray #endif } - - /* Ray offset to avoid self intersection */ __device_inline float3 ray_offset(float3 P, float3 Ng) |