From: Felix <fx...@gm...> - 2005-01-28 13:28:31
|
Am Freitag, den 28.01.2005, 14:29 +0200 schrieb Arttu Yl=E4rakkola: > >> When using OpenGL and smooth shading, I get flat shading. > > I fixed this bug in CVS on 15th December. > > ...new snapshots should be available next week. >=20 > Excellent, excellent! >=20 > I also get some incorrect coloring in all those triangles that are > clipped. When changing a clipped triangle's location so that it still > remains (partially) clipped (=3Dpart of the triangle is off-screen), the = the > coloring sort of "scrolls from edge to edge" along the triangle surface. >=20 > When all 3 points of a triangle are in view, the triangle in question wil= l > be correctly colored (except of course flat, not smooth, with my current > incorrectly working driver). >=20 > Might this be also fixed? Random guess: perhaps it is the same bug as the > one which causes smooth shading to be flat shading? It's a consequence of the same bug. With smooth shading colors are interpolated between the points of a triangle. With flat shading the hardware considers only the color of the last point and ignores the others. If the last point is clipped (outside the viewport) two new points are introduced by interpolating coordinates and colors along the clipped edges. Now if the hardware thinks it has to do flat shading then the result will be that the color of the whole triangle changes (or scrolls, like you put it) because the color of the point that determines the color is the result of the interpolation. --=20 | Felix K=FChling <fx...@gm...> http://fxk.de.vu | | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 | |