freetype-devel
[Top][All Lists]
Advanced

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

Re: SDF format


From: Alexei Podtelezhnikov
Subject: Re: SDF format
Date: Mon, 28 Dec 2020 11:46:35 -0500

On Mon, Dec 28, 2020 at 8:31 AM Werner LEMBERG <wl@gnu.org> wrote:
> > [...], we can definitely use 8 bit output to represent SDF and
> > render acceptable text using it.  Now, we can either eliminate the
> > current 16 bit output, or, we can keep both 16 and 8 bit output.
> > What do you think will be the better option?  I think we should keep
> > a single output (probably 8 bit) and later add an option to directly
> > output floating point data (if we decide to add floating point
> > calculations to FreeType)
>
> I have no opinion on this due to lack of experience with SDF
> applications.

I still think we have to think in practical terms. We are producing an
SDF texture which is subject to interpolation and a step function to
produce a smooth image often using GPU facilities. I brought up our
traditional antialiasing as a "trivial" distance field to illustrate
that 256 levels of grays is more than enough for visual perception. We
do not need to improve it using higher distance precision. We can use
all 8 bits available scaled to a given spread from 0 outside to 255
inside. without specifying 3.5 o 2.6. We would produce a texture with
format GL_ALPHA and type GL_UNISIGNED_BYTE, It is much better to have
higher grid resolution than higher distance precision. My vote is to
eliminate GRAY16 until somebody asks for it explicitly.

Alexei



reply via email to

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