Re: composite manager thoughts
Allen Akin <[email protected]>
| Newsgroups | gmane.comp.freedesktop.xserver |
|---|---|
| Message-ID | <[email protected]> |
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