View Full Version : Fog?

02-14-2000, 10:52 PM
It doesn't matter what value i put in the glFogf(GL_FOG_START, 1.0f);
glFogf(GL_FOG_END, 5.0f);
It always look the same!
Any ideas?

02-14-2000, 11:39 PM
This will only work with linear fog, so check that you are using this type of fog (and not GL_EXP or GL_EXP2 !).

Moreover, it can be a density problem...

Can you describe more precisely what you see on the screen ? (And what you'd like to see ! http://www.opengl.org/discussion_boards/ubb/smile.gif)


02-14-2000, 11:59 PM
Im using GL_EXP2 now.
I want to be able to move the fog forward and backwards, thats what
glFogf(GL_FOG_START, 1.0f); is made for ? or have i got this completely wrong?
I dont have my compiler here right now so i cant try GL_LINEAR right now, i hope that's the problem http://www.opengl.org/discussion_boards/ubb/smile.gif

02-15-2000, 12:01 AM
oh i forgott, when i use GL_EXP2 i see fog but i cant change it forwards and backwards only the density.

02-18-2000, 01:53 AM
The GL_START and GL_END tokens will only work with linear fog. You can not set fog start and end for exp or exp2 fogs !

You should have a look at volumetric fog topics if you are looking for more realistic fog than basic OpenGL one...


02-18-2000, 11:18 AM
Remember that exp(0)=1, and linear(0)=0, so the fog is *really* different if you are in exp (or exp2) or if you're in linear !