Re: composite manager thoughts
Jon Smirl <jonsmirl-/[email protected]>
| Newsgroups | gmane.comp.freedesktop.xserver |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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-u7BhqnqprCWvj1b/[email protected] > http://pdx.freedesktop.org/cgi-bin/mailman/listinfo/xserver ===== Jon Smirl jonsmirl-/[email protected] __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/