Cycles: Made Embree ignore curve intersections with SSS.
authorStefan Werner <stefan.werner@tangent-animation.com>
Wed, 20 Mar 2019 11:27:35 +0000 (12:27 +0100)
committerStefan Werner <stefan.werner@tangent-animation.com>
Wed, 20 Mar 2019 11:30:33 +0000 (12:30 +0100)
intern/cycles/bvh/bvh_embree.cpp

index 4b5c715..fa9993d 100644 (file)
@@ -149,6 +149,13 @@ static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments* args)
                                break;
                        }
 
+                       /* Ignore curves. */
+                       if(hit->geomID & 1) {
+                               /* This tells Embree to continue tracing. */
+                               *args->valid = 0;
+                               break;
+                       }
+
                        /* See triangle_intersect_subsurface() for the native equivalent. */
                        for(int i = min(ctx->max_hits, ctx->ss_isect->num_hits) - 1; i >= 0; --i) {
                                if(ctx->ss_isect->hits[i].t == ray->tfar) {