Re: Some perspective from the cheap seats...
Keith Packard <[email protected]>
| Newsgroups | gmane.comp.xfree86.forum |
|---|---|
| Message-ID | <E18y0Kp-0001Jc-00@localhost> |
Around 20 o'clock on Mar 25, Mark Vojkovich wrote: > I wasn't following the details to closely, but I remember discussion > about how primitives were joining in order to avoid cracks. You > needed some absurd amount of precision to do that. That's all going > to end up in software, imprecise or not. Ah. Yes, you missed some important details. The discussion was about how to *avoid* needing absurd precision to join cleanly, and the answer is you just do point sampling. You get 'less precise' results, but you don't get seams. I think most polygon fill hardware does essentially super-sampling, which is exactly what we want here. The current software polygon code does something quite crazy to compute where to place the sample points so that the error is minimized, but we've since learned that it's not really possible -- there are corner cases which bite you, and you can still construct figures which cover essentially none of a pixel and yet have alpha == 1. The current plan for precise polygons is to use a regular grid of points, but I haven't had the time to reimplement the rendering code inside the server. A nice result is that I've proven to myself that this is really as good as you can get, and so I'm done trying to find a better solution. And, this should match hardware quite closely; precise polygons should really be just 'more accurate' than imprecise ones as hardware I know of doesn't compute 8-bit coverage information for each pixel. OpenGL solved the other half of the clean join problem with their mystic compositing functions; I took that and reinterpreted Porter/Duff to create some compositing operators with known sub-pixel geometry. You should be able to accelerate DisjointOver quite easily, and that's what's used to draw seamless trapezoids without an intermediate alpha plane. > Composite alpha is supported. That's cool. I'm hoping to get trapzoids drawn with component alpha as well to make geometric figures look really sharp (if not fully accelerated). (as an aside -- I've been calling it 'component' alpha; perhaps we need a glossary in the Render spec...) > Needless to say, this stuff is off by default due to the test and > verification problem. I've got about 20% of a Render test suite written; we'll see if I can't find another batch of students to keep working on it and eventually finish it off. -keith