freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype-devel] Re: GSOC - Distance Fields


From: Anuj Verma
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Sat, 4 Jul 2020 17:46:56 +0530

> from a mathematical point of view only, you are doing a/64 + b/64
> (this line and also a bit above, which can be factorized like that :
> (a+b)/64. Maybe it is needed to divide first by 64 each term, i don't
> know, i just wanted to point this

I did this to avoid a few divisions and it works fine.

Took me long enough to find out,
The problem was with negating unsigned int.
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/sdf/ftsdfrend.c?h=anuj-distance-field#n228
I was subtracting an unsigned int from a signed long
which caused the value to wrap around. It never happened
on windows even with gcc, I'm glad I tested it on linux.

Thanks for your input.

I've updated the demo and it works fine now.

The basic sdf module is done, now that is left is to
optimize it, fix bugs etc. I will start by optimizing it.
I have decided to test three optimization method:
* Bounding box
* Subdivisions
* And also a coarse grid method that Behdad suggested.

Vincent suggested some good tools for profiling. I'm gonna
use linux so if you have any more suggestions please do let
me know, profiling is pretty new to me.
I will also keep updating the demo program.

Thanks for the feedback on the evaluation,
Anuj

reply via email to

[Prev in Thread] Current Thread [Next in Thread]