4
\$\begingroup\$

I'm building a game with Ogre3d, I've got fog working properly with: scenemanager->setFog(Ogre::FOG_LINEAR, Ogre::ColourValue( 0.23f, 0.725f, 1.0f ), 0, 18, 20 );

However I'm currently implementing a GUI system (libRocket) which is rendered on top of everything else, and this removes the fog, does anyone know how to fix this? (I'm using the default libRocket rendering system for ogre as included in the samples, but this problem also appears when using a semi-transparent overlay).

\$\endgroup\$
1
  • \$\begingroup\$ This sounds like 2 separate problems. I'll risk it: firstly you'll explicitly have to turn off fog for all the UI geometry (if it's 2D or has it's own perception of depth it shouldn't be influenced by anyting depth-based in the scene anyway). Secondly the additive geometry might behave a little strange because the fog color should be black (i.e fade-to-black instead to-fog-color since we're adding/subtracing)? Just a generic hunch :) \$\endgroup\$
    – njdw
    Commented Jul 14, 2011 at 14:38

1 Answer 1

1
\$\begingroup\$

I use Mogr3D, but I have built my own UI rendering system. Probably libRocket does the same,

Try to do some tests by using the Overlay objects, if I'm correct they do not remove the fog from the SceneManager.

Does libRocket use .material files or vertex scripts that might remove the fog there?

Have you tried adding the fog AFTER adding the UI stuff ?

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .