* src/sdf/ftbsdf.c (compare_neighbor): Fix bug.

This commit is contained in:
Anuj Verma 2020-08-01 10:04:49 +05:30 committed by anujverma
parent 903d28725a
commit 436f091db1
2 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2020-08-1 Anuj Verma <anujv@iitbhilai.ac.in>
* src/sdf/ftbsdf.c (compare_neighbor): Fix bug.
2020-08-1 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf -> bsdf] Optimized a bit.

View File

@ -214,9 +214,6 @@
FT_16D16 alphas[9];
if ( x == 41 && y == 72 )
gx = 0;
/* Since our spread cannot be 0, this condition */
/* can never be true. */
if ( x <= 0 || x >= w - 1 ||
@ -547,9 +544,10 @@
/* Of course this will be eliminated while using */
/* squared distances. */
/* Approximate the distance, use 1 to avoid */
/* precision errors. */
dist = to_check->dist + ONE;
/* Approximate the distance, use 1 to avoid */
/* precision errors. We subtract because the */
/* two directions can be opposite. */
dist = to_check->dist - ONE;
if ( dist < current->dist )
{