Layered fog

Hi, Somebody knows or has idea how could I do layered fog with OpenGL?, There are extensions to do it?

Thanks a lot.

What do you mean by layered fog?? Fog in opengl can be either for the entire scene, or vulemtrix where it is confined in a certain space. However, these fogs are static and are rathe simple. If you want to have advanced fog which isnt static you would have to use a particle system…

I want to change the intensity of fog on Y axis, but I don’t want volumetric fog because is very inefficient in real time. For example I have a city with fog and when I go up and see the city from the sky I want to see the fog in the city but not near of me (in clouds or other planes). Also, when I see to front I want light fog, but when I see to down I want dense fog over the city.


Looks like a job for EXT_fog_coord . That extension, or a vertex program, is used to create fog effects OpenGL can’t do.