From: Keith W. <ke...@va...> - 2000-10-27 17:04:24
|
I've implemented these two extensions. EXT_secondary_color hasn't been hooked into dispatch, and so hasn't been tested & isn't enabled yet. I've tested EXT_fog_coord with ATI's demo, after some de-windows-ing. The treatment of fog in the software rasterzer has changed somewhat. The trick of merging fog colors into vertex colors during the vertex pipeline has been removed. This wasn't happening for any of the accelerated drivers (FX, utah or dri), to my knowledge, as any driver that asserted it has hardware fog would disable this stage. We can do this inside the triangle functions if anyone decides they want to. I was unwilling to play with the logic for choosing line/point/triangle functions at this point, so the fog coordinate will be interpolated whenever z is interpolated. This is wasteful & will probably be fixed before too long. Brian: It occurs to me that calculating a fog factor at the vertices and interpolating linearly across the triangle is less accurate than doing the fog equation at each pixel. Is there a requirement to do it per pixel (in certain hint modes, for instance)? Drivers with table fog don't need fog calculations except during fallbacks. The FX driver has an example of how this can be done, though further testing of this is required. Drivers with fog in the 4th component of specular color (mga, i810, r128) no longer need to fiddle with the pipeline to get fog coordinates, as this is now the standard mechanism for calculating fog at the vertices. Keith |