SkyDome + Fog

Started by kramer, August 05, 2005, 08:47:36

Previous topic - Next topic

kramer

Hi All,

I want to have nice picturesque clouds in my sky, so I am using a texture mapped sky dome which achieves this nicely.

However, I also want to have the terrain get hazy in the distance, which I can achieve with glFog. The problem is that the fog completly kills the sky dome because of it's distance away.

It occurred to me that one could write a pixel shader which imitated the fog equation but only near the horizon (decreasing as Y increases, thus allowing the beautful clouds on the sky dome texture to show through.)  But before attempting such a shader I wanted to see if anyone else had overcome this problem in a different way.

darkprophet

volumetric fog does that nicely. Not sure how easy that is to implement, but it shouldn't be too hard...

Fool Running

You should be able to disable fog (and maybe extend your far Z plane) then draw the dome, then setup the fog (and maybe the far Z plane) to draw the terrain.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

kramer

Ahh, thanks.  that worked nicely