diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2020-08-17 17:04:01 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2020-08-17 21:41:34 +0300 |
commit | 1c892e6814adf7431aa9abbe1bd560547f7144d2 (patch) | |
tree | db2f2662ae05791621d7276b81d883c34d7bca2a /intern/cycles | |
parent | 4b69e55da358cbfe98fd9ac85151a7107315959b (diff) |
Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.
Fixes T79723
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/bvh/bvh_embree.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp index 17e1f86a589..4ef873634f0 100644 --- a/intern/cycles/bvh/bvh_embree.cpp +++ b/intern/cycles/bvh/bvh_embree.cpp @@ -126,9 +126,13 @@ static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments *args) } else { kernel_embree_convert_hit(kg, ray, hit, ¤t_isect); - if (ctx->local_object_id != current_isect.object) { + int object = (current_isect.object == OBJECT_NONE) ? + kernel_tex_fetch(__prim_object, current_isect.prim) : + current_isect.object; + if (ctx->local_object_id != object) { /* This tells Embree to continue tracing. */ *args->valid = 0; + break; } } |