Simple ground fog

New Message Reply Date view Thread view Subject view Author view

From: Roy Ruddle (Ruddle++at++Cardiff.ac.uk)
Date: 01/26/2000 11:46:32


Hi there,

I've been trying unsuccessfully to implement ground fog that extends from
-10 to 100 m. I either get the fog only extending to my view height (1.5
m) or I get whacky images (Z buffer not getting cleared). Can anyone point
me in the right direction?

main()
...
esky->setMode(PFES_BUFFER_CLEAR, PFES_FAST); // Fog only goes to view
height
esky->setMode(PFES_BUFFER_CLEAR, PFES_SKY_GRND); // Weird Z buffer
esky->setAttr(PFES_GRND_HT, 100.0 );
esky->setColor(PFES_GRND_FAR, 0.3f, 0.1f, 0.0f, 1.0f);
esky->setColor(PFES_GRND_NEAR, 0.5f, 0.3f, 0.1f, 1.0f);
chan->setESky(esky);
...

void OpenPipeWin(pfPipeWindow *pw_local)
...
  pfFog *fog = new pfFog;
  fog->setFogType( PFFOG_VTX_LIN );
  fog->setColor( 1.0, 1.0, 1.0 );
  fog->setRange( 20.0, 50.0 );
  pfEnable( PFEN_FOG );
  fog->apply();
  pfOverride( PFSTATE_FOG | PFSTATE_ENFOG, PF_ON );
...

many tks

roy


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jan 26 2000 - 11:46:46 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.