4 ms·
Interesting article -- but that assumes that you have both an RGBA source and an RGBA mask -- twice the RAM. When doing full screen compositing ram is a big de
by jbeda 14y ago
Interesting article -- but that assumes that you have both an RGBA source and an RGBA mask -- twice the RAM. When doing full screen compositing ram is a big deal.
If you are rendering solid color text, the source could be a constant. But if you are doing general composting the source needs to be another bitmap. You effectively use that mask as an RGB alpha channels.
- ori_b 14y agoMost text is solid color, as far as I can see. And for colored glyphs, couldn't you upload a single "font texture" with all the glyphs you care about, and clip out the section you want to paint as a series of subimages, as opposed to rendering one large full screen image? It would still use more RAM, but the amount would be limited. And you'd only have to rasterize the splines for the font once. Sorry if I'm missing something, I'm not a graphics expert at all.
- jbeda 14y agoPerhaps I'm not being clear. In WPF/Avalon we aimed to have a generic scene graph. We were also looking to cache intermediate nodes in the scene graph and do composition of a transform on those nodes. This was to prevent the need to completely rerender a complex scene graph tree on every frame if the transformations were small enough. The issue arises when you want to composite text onto a background and then further composite that result onto another image. If there is any transparency under the text in the intermediate cached image, cleartype/subpixel antialiasing breaks down. So -- it is straightforward to figure out how to do a subpixel mask composition, but it is much harder when you want to take that result and composite it further. This was a while ago so perhaps I'm misremembering though :)
- ori_b 14y agoOk, I think that makes sense. Just to make sure I understood, the problem isn't the text itself, but what happens when the destination surface has an alpha channel or is transformed?
- jbeda 14y agoExactly -- if you composite into a buffer without an alpha channel (such as the final frame buffer) you are cool. If you want the destination to be able to alpha composite further on, you have trouble/complexity.