[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] anuj-distance-field 3dd4918 91/95: * src/sdf/ftbsdf.c (compa
From: |
Anuj Verma |
Subject: |
[freetype2] anuj-distance-field 3dd4918 91/95: * src/sdf/ftbsdf.c (compare_neighbor): Fix bug. |
Date: |
Sun, 2 Aug 2020 01:10:43 -0400 (EDT) |
branch: anuj-distance-field
commit 3dd491842e9e29c8d90b8fdd2bfdc7ae5f819cd5
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>
* src/sdf/ftbsdf.c (compare_neighbor): Fix bug.
---
[GSoC]ChangeLog | 4 ++++
src/sdf/ftbsdf.c | 10 ++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog
index 2e77c56..c790cba 100644
--- a/[GSoC]ChangeLog
+++ b/[GSoC]ChangeLog
@@ -1,5 +1,9 @@
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.
* src/sdf/ftbsdf.c (ED: sign => alpha): Renamed sign
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c
index dd05052..73f63dc 100644
--- a/src/sdf/ftbsdf.c
+++ b/src/sdf/ftbsdf.c
@@ -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 )
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] anuj-distance-field 3dd4918 91/95: * src/sdf/ftbsdf.c (compare_neighbor): Fix bug.,
Anuj Verma <=