[Bf-blender-cvs] [3cee28e] master: Fix T46143: Faces missing with GPU render

Sergey Sharybin noreply at git.blender.org
Thu Sep 17 14:21:21 CEST 2015


Commit: 3cee28ebf3c808e511255095aa68d24305721198
Author: Sergey Sharybin
Date:   Thu Sep 17 17:17:29 2015 +0500
Branches: master
https://developer.blender.org/rB3cee28ebf3c808e511255095aa68d24305721198

Fix T46143: Faces missing with GPU render

Epsilon was quite arbitrary for GPU, replaced with checking for zero-sized faces.

It should solve both original report and the new one. After the release we can check
why GPU doesn't produce accurate math here and go to the root of the issue.

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

M	intern/cycles/kernel/geom/geom_triangle_intersect.h

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

diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h
index 65f6c9a..ba309a1 100644
--- a/intern/cycles/kernel/geom/geom_triangle_intersect.h
+++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h
@@ -179,7 +179,7 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg,
 		float4 a = tri_b - tri_a, b = tri_c - tri_a;
 		if(len_squared(make_float3(a.y*b.z - a.z*b.y,
 		                           a.z*b.x - a.x*b.z,
-		                           a.x*b.y - a.y*b.x)) < 1e-16f)
+		                           a.x*b.y - a.y*b.x)) == 0.0f)
 		{
 			return false;
 		}




More information about the Bf-blender-cvs mailing list