Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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

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 ?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.