composite manager thoughts
Jon Smirl
jonsmirl@yahoo.com
Sun, 28 Dec 2003 20:56:18 -0800 (PST)
You don't really want a pixel or vertex shader to do this. What you need is a
texture program. Some hardware allows compressed textures, I wonder if that is
done in microcode? If so it might be possible to write a texture program. A
glyph would just a be represented by as a very special compression algorithm.
Maybe an expert on shaders will read this tomorrow and answer all our questions.
--- Allen Akin <akin@pobox.com> wrote:
> On Sun, Dec 28, 2003 at 07:53:12PM -0800, Jon Smirl wrote:
>
> | This is why I've been sending some proposals around to people about drawing
> | text with pixel shaders. The basic idea is to have one shader per glyph.
>
> I'm told that context switching the shaders is very expensive on current
> hardware, so that would be important to test. (You might be forced to
> optimize by drawing all the "a" characters on a page, then all the "b"
> characters, etc.)
>
> | TrueType glyphs would be preprocessed into curve segments and each pixel
> would
> | be tested if it is inside or outside the segments. ...
>
> What's the advantage over using vertex programs to generate triangles that the
> rasterizers then handle?
>
> Also, since the curve segments change under geometric transforms like
> projective mapping, would one fragment program be enough, or would you need
> different programs to handle different sorts of transformations?
>
> | ... It is possible to
> antialias,
> | subpixel render, hint at small sizes, etc in the shader program.
>
> I don't know enough about hinting, but as far as I can tell several of the
> algorithms require knowledge about adjacent structures at higher levels of
> abstraction than individual pixels -- particularly edge widths, angles,
> dropouts, etc. It seems to me that it would be hard to give a fragment
> program
> enough context to handle that sort of thing. What are your thoughts on
> that?
>
> | So far as I know no one has actually tried writing a shader that draws text.
>
> Not that I know of, either. But I suspect it's been done, and we just
> haven't heard.
>
> Allen
>
> _______________________________________________
> Xserver mailing list
> Xserver@pdx.freedesktop.org
> http://pdx.freedesktop.org/cgi-bin/mailman/listinfo/xserver
=====
Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/