diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 5938fb13c..b0af85c0b 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -411,6 +411,7 @@ public: , mUpdater(new Updater) { mTransform->addUpdateCallback(mUpdater); + mTransform->setNodeMask(Mask_Sun); osg::ref_ptr sunTex = textureManager.getTexture2D("textures/tx_sun_05.dds", osg::Texture::CLAMP, diff --git a/apps/openmw/mwrender/vismask.hpp b/apps/openmw/mwrender/vismask.hpp index 7faae4602..b1329e958 100644 --- a/apps/openmw/mwrender/vismask.hpp +++ b/apps/openmw/mwrender/vismask.hpp @@ -15,20 +15,21 @@ namespace MWRender Mask_Actor = (1<<3), Mask_Player = (1<<4), Mask_Sky = (1<<5), - Mask_Water = (1<<6), - Mask_SimpleWater = (1<<7), - Mask_Terrain = (1<<8), - Mask_FirstPerson = (1<<9), + Mask_Sun = (1<<6), + Mask_Water = (1<<7), + Mask_SimpleWater = (1<<8), + Mask_Terrain = (1<<9), + Mask_FirstPerson = (1<<10), // top level masks - Mask_Scene = (1<<10), - Mask_GUI = (1<<11), + Mask_Scene = (1<<11), + Mask_GUI = (1<<12), // Set on a Geode - Mask_ParticleSystem = (1<<12), + Mask_ParticleSystem = (1<<13), // Set on cameras within the main scene graph - Mask_RenderToTexture = (1<<13) + Mask_RenderToTexture = (1<<14) // reserved: (1<<16) for SceneUtil::Mask_Lit }; diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index 81f7c4e11..09143a3bd 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -259,7 +259,7 @@ public: setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setReferenceFrame(osg::Camera::RELATIVE_RF); - setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_Actor|Mask_ParticleSystem|Mask_Sky|Mask_Player|(1<<16)); + setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_Actor|Mask_ParticleSystem|Mask_Sky|Mask_Sun|Mask_Player|(1<<16)); setNodeMask(Mask_RenderToTexture); setViewport(0, 0, rttSize, rttSize);