# Ogre3D Fog with overlays

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).

• 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 :) – njdw Jul 14 '11 at 14:38