[Bf-blender-cvs] [0c17c5b8f18] cycles_embree: Cycles: Fixed wrong Embree line intersections

Stefan Werner noreply at git.blender.org
Sun Nov 26 23:11:35 CET 2017


Commit: 0c17c5b8f18deb305eaaf11339d70986dd7601d0
Author: Stefan Werner
Date:   Tue Oct 24 13:46:30 2017 +0200
Branches: cycles_embree
https://developer.blender.org/rB0c17c5b8f18deb305eaaf11339d70986dd7601d0

Cycles: Fixed wrong Embree line intersections

Line segments should not go through the backfacing test.

===================================================================

M	intern/cycles/bvh/bvh_embree.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp
index 71fcf35cce9..23e68b3190e 100644
--- a/intern/cycles/bvh/bvh_embree.cpp
+++ b/intern/cycles/bvh/bvh_embree.cpp
@@ -56,7 +56,9 @@ void rtc_filter_func(void*, RTCRay& ray_)
 	KernelGlobals *kg = ray.kg;
 
 	/* For all ray types: check if there is backfacing hair to ignore */
-	if(!(kernel_data.curve.curveflags & CURVE_KN_BACKFACING) && !(kernel_data.curve.curveflags & CURVE_KN_RIBBONS) && ray.geomID & 1) {
+	if((kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE)
+		&& !(kernel_data.curve.curveflags & CURVE_KN_BACKFACING)
+		&& !(kernel_data.curve.curveflags & CURVE_KN_RIBBONS) && ray.geomID & 1) {
 		if(dot(make_float3(ray.dir[0], ray.dir[1], ray.dir[2]), make_float3(ray.Ng[0], ray.Ng[1], ray.Ng[2])) > 0.0f) {
 			ray.geomID = RTC_INVALID_GEOMETRY_ID;
 			return;



More information about the Bf-blender-cvs mailing list