On 2002.04.03 23:50 Sergey V. Udaltsov wrote:
> > He!He!.. you missed!! It's a mix of variant 1 and 2..! :)
> Cool. At least 1+2 is the answer (call it 5). Thanks.
> 
> > As Leif previously said is his reply, it can be done in hardware by
> > messing the colors of the vertex to incorporate the fog (as software
> Mesa
> > used to do in 3.x) but it's non-conformant to the OpenGL spec.
> What's the difference in Mesa 4? Is it better? Can it be done in HW?
> Will this non-conformance cause visible problems on display?

In Mesa 3.x when fog was enabled the vertex colors were changed so that 
the further away is the vertex more its color is nearer to the fog 
background color. Since the colors are interpolated in the triangle this 
gave the impression of fog.

But the OpenGL spec says that the fog color is calculated on a _pixel_ 
basis and not on a _vertex_ basis. Indeed the result is different, 
especially in long polygons that span from the front way to the back.

Mach64 is able to do the fog properly, i.e., on a pixel basis, but _not_ 
when alpha blending since it uses the path on chip. So the problem is only 
what to do when both fog and alpha blending are enabled.

The solution of using these depending of the contents of a env var is a 
compromise so that gamers achieve a better gameplay sacrifying a little 
the visual quality and the OpenGL conformance.

There are other situations as this one. Leif checked on Unreal and there 
is one (also when alpha blending) that happens and according with his 
experiments reverting to software leads to a severe performance hit.  
> 
> > So the solution found is to do it either like this or by software
> > depending of the value of a environment var.
> Cool! And the default version will be HW-based non-conformant, won't it?

This is very subjective, but if we assume that DRI aims to be OpenGL 
conformant, I vote for sw-based conformant...

> ...
> 
> BTW, I can seriously recommend 3ddesktop as a test tool. It supports
> several effects (blending, textures, etc. with on/off switching) so its
> behavior could give a lot of hints to the developers.

I'll check it.

> 
> Cheers,
> 
> Sergey
> 

Regards,

José Fonseca

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to