LineArt: Tolerance for faces perpendicular to view
This is due to cam->obmat precision issue, where it affects view vector precision. Reviewed by Sebastian Parborg (zeddb) Differential Revision: https://developer.blender.org/D11461
This commit is contained in:
parent
a55b73417f
commit
5b176b66da
|
@ -2064,7 +2064,11 @@ static bool lineart_triangle_edge_image_space_occlusion(SpinLock *UNUSED(spl),
|
|||
dot_r = dot_v3v3_db(Rv, tri->gn);
|
||||
dot_f = dot_v3v3_db(Cv, tri->gn);
|
||||
|
||||
if (!dot_f) {
|
||||
/* NOTE(Yiming): When we don't use `dot_f==0` here, it's theoretically possibile that _some_
|
||||
* faces in perspective mode would get erroneously caught in this condition where they really are
|
||||
* legit faces that would produce occlusion, but haven't encountered those yet in my test files.
|
||||
*/
|
||||
if (fabs(dot_f) < FLT_EPSILON) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue