PDA

View Full Version : fog not working on geforce2 ?



aphex
06-13-2001, 04:50 AM
hi there... we have switched from TNT2/G400 to GeForce2 GTS, and have encountered a problem with our fog settings. Ok, the fog worked fine on the older cards, it was like 100 units deep, and the code to init it was:

glEnable(GL_FOG);
GLfloat fogColor[4] = {col.r,col.g,col.b,1.0};
GLint fogMode = GL_EXP2;
glFogi(GL_FOG_MODE, fogMode);
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_DENSITY, 0.005f);
glFogf(GL_FOG_DENSITY, 0.03f);
glHint(GL_FOG_HINT, GL_DONT_CARE);
glFogf(GL_FOG_START, 7.0);
glFogf(GL_FOG_END, 100.0);

Ok, that worked well on old cards, but the geforces simply ignore all that... what is wrong?


thx,

Sancho
06-13-2001, 05:17 AM
Are you using the register combiners to render your shape ? In this case don't forget to add the fog fragment (and specular fragment if needed).

David

aphex
06-13-2001, 05:37 AM
nope, but i wasn't aware of anything regarding register combiners and fog... we use blending, multitexturing with combine_ext, but that's it... could you elaborate some more on that potential issue?

dani


Originally posted by Sancho:
Are you using the register combiners to render your shape ? In this case don't forget to add the fog fragment (and specular fragment if needed).

David