Fog START and END have no effect

Started by
1 comment, last by kburkhart84 18 years, 8 months ago
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.
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).
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.


This topic is closed to new replies.

Advertisement