From: Brian P. <br...@va...> - 2001-07-13 16:25:03
|
Allen Barnett wrote: > > Hi, > > I see a slight artifact in the attached snapshot (the brighter, broken, > vertical yellow line above the left edge of the "O"). The image was > generated from two overlapping, texture-mapped quads drawn in the same > plane (z=0). The blue parts are opaque (r=0.,g=0,b=.5,a=1), while the > yellowish parts have alpha = .3 (1,1,0,.3). Blending and the depth test > are turned on. If I turn off the depth test, the artifact goes away. > > If you could give me some idea where in the code (software Mesa 3.5.1 > under X) the pixels are computed for a depth-tested, alpha-blended, > texture-mapped quad, I'll be glad to track this down a little further. > It's probably unavoidable round-off somewhere, but I'd like to > understand what it's the round-off of! > > (I'd don't see the artifact in DRI/Mesa 3.4.2 in either direct or > indirect rendering modes, though.) You may have just been getting lucky with 3.4.2. There are minor differences in the triangle rasterizer in 3.5. Are you rendering the quads with any rotation (other than around Z)? If so, you should be aware that rendering coplanar polygons is always going to be a problem because of "z fighting". That's when minor differences in rasterization basically result in random Z priority of the overlapping quads. Solutions include polygon offset, stencilling, or disable Z testing/writing if you really don't need it. Your sample image looks funny though in that the bright yellow pixels don't appear to be in the actual overlap area. Do you have a test program? -Brian |