Jump to content
  • Advertisement
Sign in to follow this  
slikrik

Fog START and END have no effect

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings, I'm attempting my first hack at using fog (as in Lesson #16), and I can't seem to figure out why changing the values for the fog start and end has no effect. I assumed start and end had to be between [0, 1] but the tutorial has start = 1, and end = 5. If I change the start to 100 and end to 500 (both well behind the rendered cube), I get no change in the appearance of the fog. In fact, I can make them both 0 and it has no effect. Why is this? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
IIRC, fog start and end is only used when using linear fog. Exponential fog types only pay attention to the fog density (and likewise linear fog ignores the density).

Share this post


Link to post
Share on other sites
OpenGL defaults to the simplest fog, which uses the density factor, not the start end. Make it the GL_LINEAR fog and then the start and end matters, and the density won't anymore.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!