[Bf-blender-cvs] [454075ddfc7] cycles_embree: Cycles: Fixed parametric coordinates for hair intersections with Embree

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


Commit: 454075ddfc7f1c30d27888933e88aa2dadce00fc
Author: Stefan Werner
Date:   Mon Sep 18 22:37:54 2017 +0200
Branches: cycles_embree
https://developer.blender.org/rB454075ddfc7f1c30d27888933e88aa2dadce00fc

Cycles: Fixed parametric coordinates for hair intersections with Embree

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

M	intern/cycles/kernel/bvh/bvh_embree_traversal.h

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

diff --git a/intern/cycles/kernel/bvh/bvh_embree_traversal.h b/intern/cycles/kernel/bvh/bvh_embree_traversal.h
index ef00a554472..917e287482f 100644
--- a/intern/cycles/kernel/bvh/bvh_embree_traversal.h
+++ b/intern/cycles/kernel/bvh/bvh_embree_traversal.h
@@ -67,11 +67,8 @@ struct RTCORE_ALIGN(16) CCLRay : public RTCRay {
 	void isect_to_ccl(ccl::Intersection *isect)
 	{
 		const bool is_hair = geomID & 1;
-		isect->u = 1.0f - v - u;
+		isect->u = is_hair ? u : 1.0f - v - u;
 		isect->v = u;
-		if(is_hair) {
-		//	isect->v = 0.0f;// hair
-		}
 		isect->t = tfar;
 		if(instID != RTC_INVALID_GEOMETRY_ID) {
 			RTCScene inst_scene = (RTCScene)rtcGetUserData(kernel_data.bvh.scene, instID);



More information about the Bf-blender-cvs mailing list