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.
This commit is contained in:
parent
c4bcb6a479
commit
3cee28ebf3
Notes:
blender-bot
2023-02-14 08:39:20 +01:00
Referenced by issue #46143, faces missing with GPU render
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue