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
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/bvh/bvh_embree.cpp')
-rw-r--r--intern/cycles/bvh/bvh_embree.cpp6
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, &current_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;
}
}