FOG_COORD + CATALYST 4.8

Hi,

I’ve got a trouble with that code only with RADEON 9700 :

ONLY ->
glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
glFogf(GL_FOG_DENSITY, 0.22/CoefTailleRelief);
–> OK

ONLY ->
(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
glFogf(GL_FOG_DENSITY, 0.22/CoefTailleRelief);
–> OK

BUT ->
if toto then

glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
glFogf(GL_FOG_DENSITY, 0.22);

else

glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
glFogf(GL_FOG_DENSITY, 0.011);

–> NOK (too much fog everywhere)

Any idea ?

There is no way to tell if these code fragments are the same since CoefTailleRelief is used in one not the other. There’s also ne way to tell if .011 is .22 over CoefTailleRelief and if your test passes or fails. Passing that test and using .22 instead of .22/CoefTailleRelief for fog density may be your problem.

Please use C code correctly if you can, the whole “if toto then” thing just makes things less clear.