From: Leif D. <lde...@re...> - 2002-07-17 14:06:29
|
On 17 Jul 2002, Michel D=E4nzer wrote: > On Tue, 2002-07-16 at 20:17, Leif Delgass wrote:=20 > > On Tue, 16 Jul 2002, Keith Whitwell wrote: > >=20 > > > > Well, it's not high on my list. I don't think flat-shading is us= ed that > > > > often, and the changes don't have any effect on smooth shading. = Actually,=20 > > > > it _eliminates_ some saves/restores necessary for unfilled polygo= ns with=20 > > > > hardware flat-shading. > > > > =20 > > > > Actually, I think the problem is larger than mach64. Rage128 has= the same > > > > problem and it appears to have GL compliant flat-shading based on= the > > > > primitive. The problem is that for clipped polygons, the primiti= ve type > > > > changes, so flat-shading breaks down in that case (like with unfi= lled > > > > polygons). I think the templates would have to be changed to cop= y the > > > > provoking-vertex color of the polygon being clipped into the vert= ices of > > > > the triangles generated by clipping, rather than interpolating th= e color. > > >=20 > > > I'm surprised that this isn't working. Can you verify? I tested o= n the i810=20 > > > at the time & definitely got clipping working there... > >=20 > > Here's a couple screenshots with the r128 driver (20020629 build): > >=20 > > http://www.retinalburn.net/linux/r128-unclipped-flat.png > > http://www.retinalburn.net/linux/r128-clipped-flat.png > >=20 > > Allen's test program is attached. Maybe someone could check this on=20 > > Radeon with software tcl as well? >=20 > Broken, as expected. As we've both been reporting for some time, > software clipping is broken in the r128 and radeon drivers. I used to > suspect a Mesa problem, but the mga driver works. I wish I knew what to > look for about this problem... Actually, since mga uses DO_FLAT in the templates, the provoking-vertex color gets copied to all vertices. I think the problem is with interpolation and drivers that define DO_FLAT as zero. Keith said that i810 worked, but it _doesn't_ set DO_FLAT, which is the define that controls whether colors are copied. It sets HAVE_HW_FLATSHADE, but that just causes colors to be saved and restored when working with unfilled tris. --=20 Leif Delgass=20 http://www.retinalburn.net |