diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-06-03 11:34:21 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-06-03 11:36:04 +0300 |
commit | f54a98a1c56e40f9d9d2c493fe2086e92da1150d (patch) | |
tree | a7c5403bcf91330f869c925e77628d32a0db5240 /intern/cycles/kernel/geom/geom_triangle_intersect.h | |
parent | e370806b38388bb501ab99f9eb65fe2ff10d9133 (diff) |
Cycles: Simplify check for degenerated faces on GPU
Still not sure how to properly solve the issue, needs some trickery to get
actual optimized values from intersection function (using printf() avoids
some optimization and makes stuff render correct).
For the time being let's just simplify check.
Diffstat (limited to 'intern/cycles/kernel/geom/geom_triangle_intersect.h')
-rw-r--r-- | intern/cycles/kernel/geom/geom_triangle_intersect.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h index d2957ad5474..4e2f46d58d3 100644 --- a/intern/cycles/kernel/geom/geom_triangle_intersect.h +++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h @@ -160,15 +160,10 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, #endif { #ifdef __KERNEL_GPU__ - 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)) == 0.0f) - { + if(A == B && B == C) { return false; } #endif - /* Normalize U, V, W, and T. */ const float inv_det = 1.0f / det; isect->prim = triAddr; |