Jeremy Meredith wrote:
>
> I've been running into a problem with Mesa, both 3.0 and 3.1, where small
> triangles (less than ~1/4 pixel across) aren't rendered. When I use
> OpenGL instead, the image looks fine.
>
> Randy Frank suggested I give this a try with trispd.c to see if I could
> duplicate the problem. His suggestion worked:
>
> I've included the modified trispd.c. It no longer does texturing, (or
> filtering or persp. corr'n.).
>
> More importantly, however, it uses individual triangles instead of
> triangle strips to fill the screen.
>
> Try running the program as:
> trispd -size 0.3
> and then
> trispd -size 0.2
>
> The first picture should look fine, but the second has NO triangles drawn.
>
> If curious, I narrowed the cutoff down further: at a size of 0.2237 it's
> fine, at 0.2235 it's empty, and at 0.2236 it fills a few pixels if the
> starting X and Y coords are not exactly 1.0 (see the code for comments).
>
> Again, when I linked with OpenGL, I was unable to find any cutoff for
> minimum pixel size. I managed to go down to 0.01 before my patience gave
> out.
>
> I suspect this part of the actual rasterization code has not changed
> significantly between 3.0 and 3.1 since my first test case looks the same
> between these version. Since I am still using 3.0 for the public version
> of our code, if this is an easy fix and can be propogated back to 3.0 I
> would love to hear about it.
Mesa *does* do a test in the software rasterizer for very small triangles,
which it culls. This may be to prevent some underflow type errors, or it may
be unnecessary. The code to examine is tritemp.h. This code has changed
between mesa 3.0 and 3.2, but the test remains. In 3.2, look at line 142:
/* Do backface culling */
if (
area * bf < 0 ||
area * area < .0025
)
return;
Try removing the second test (area * area < .0025).
Keith
_______________________________________________
Mesa-bug maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-bug
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev