[osg-users] Fog problem

Paul Martz pmartz at skew-matrix.com
Thu Jul 10 05:55:04 PDT 2008


> Now, I think it is normal to obtain undefined result if I 
> enable fog without set the other attributes...

If you enable fog, behavior is defined. In OpenGL, the defaults are:
  FOG_MODE is EXP
  FOG_DENSITY is 1.0
  FOG_COLOR is 0,0,0,0
  FOG_COORDINATE_SOURCE is FRAGMENT_DEPTH
I don't believe OSG changes any of these, so this should be what an OSG app
gets by simply enabling Fog.

> But I still 
> ask me why it worked until yesterday, since I introduced 
> precipitation two weeks ago!

Something else in the code must have changed.

It sounds like your app (or some library that it uses) used to set the
FOG_MODE to LINEAR, but that code got deleted or changed and you suddenly
got EXP instead, resulting in all black.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466




More information about the osg-users mailing list