Don't show VFX on the map (Fixes #2324)

openmw-35
scrawl 10 years ago
parent 7e3843de42
commit 5a9b30a8ca

@ -1272,8 +1272,7 @@ void Animation::addEffect(const std::string &model, int effectId, bool loop, con
else
params.mObjects = NifOgre::Loader::createObjects(mSkelBase, bonename, "", mInsert, model);
// TODO: turn off shadow casting
setRenderProperties(params.mObjects, RV_Misc,
setRenderProperties(params.mObjects, RV_Effects,
RQG_Main, RQG_Alpha, 0.f, false, NULL);
params.mLoop = loop;

@ -25,8 +25,7 @@ void EffectManager::addEffect(const std::string &model, std::string textureOverr
NifOgre::ObjectScenePtr scene = NifOgre::Loader::createObjects(sceneNode, model);
// TODO: turn off shadow casting
MWRender::Animation::setRenderProperties(scene, RV_Misc,
MWRender::Animation::setRenderProperties(scene, RV_Effects,
RQG_Main, RQG_Alpha, 0.f, false, NULL);
for(size_t i = 0;i < scene->mControllers.size();i++)

@ -33,7 +33,7 @@ namespace MWRender
Ogre::Viewport* vp = mRenderTarget->addViewport(mCamera);
vp->setOverlaysEnabled(false);
vp->setShadowsEnabled(false);
vp->setVisibilityMask(RV_Actors + RV_Misc + RV_Statics + RV_StaticsSmall + RV_Terrain + RV_Sky + RV_FirstPerson);
vp->setVisibilityMask(RV_Refraction);
vp->setMaterialScheme("water_refraction");
vp->setBackgroundColour (Ogre::ColourValue(0.090195, 0.115685, 0.12745));
mRenderTarget->setAutoUpdated(true);

@ -30,39 +30,44 @@ enum RenderQueueGroups
enum VisibilityFlags
{
// Terrain
RV_Terrain = 1,
RV_Terrain = (1<<0),
// Statics (e.g. trees, houses)
RV_Statics = 2,
RV_Statics = (1<<1),
// Small statics
RV_StaticsSmall = 4,
RV_StaticsSmall = (1<<2),
// Water
RV_Water = 8,
RV_Water = (1<<3),
// Actors (npcs, creatures)
RV_Actors = 16,
RV_Actors = (1<<4),
// Misc objects (containers, dynamic objects)
RV_Misc = 32,
RV_Misc = (1<<5),
RV_Sky = 64,
// VFX, don't appear on map and don't cast shadows
RV_Effects = (1<<6),
RV_Sky = (1<<7),
// not visible in reflection
RV_NoReflection = 128,
RV_NoReflection = (1<<8),
RV_OcclusionQuery = 256,
RV_OcclusionQuery = (1<<9),
RV_Debug = 512,
RV_Debug = (1<<10),
// overlays, we only want these on the main render target
RV_Overlay = 1024,
RV_Overlay = (1<<11),
// First person meshes do not cast shadows
RV_FirstPerson = 2048,
RV_FirstPerson = (1<<12),
RV_Map = RV_Terrain + RV_Statics + RV_StaticsSmall + RV_Misc + RV_Water,
RV_Map = RV_Terrain + RV_Statics + RV_StaticsSmall + RV_Misc + RV_Water
RV_Refraction = RV_Actors + RV_Misc + RV_Statics + RV_StaticsSmall + RV_Terrain + RV_Effects + RV_Sky + RV_FirstPerson
};
}

@ -420,6 +420,7 @@ void Water::applyVisibilityMask()
mVisibilityFlags = RV_Terrain * Settings::Manager::getBool("reflect terrain", "Water")
+ (RV_Statics + RV_StaticsSmall + RV_Misc) * Settings::Manager::getBool("reflect statics", "Water")
+ RV_Actors * Settings::Manager::getBool("reflect actors", "Water")
+ RV_Effects
+ RV_Sky;
if (mReflection)

@ -44,7 +44,7 @@ namespace MWWorld
state.mObject->mControllers[i].setSource(Ogre::SharedPtr<MWRender::EffectAnimationTime> (new MWRender::EffectAnimationTime()));
}
MWRender::Animation::setRenderProperties(state.mObject, MWRender::RV_Misc,
MWRender::Animation::setRenderProperties(state.mObject, MWRender::RV_Effects,
MWRender::RQG_Main, MWRender::RQG_Alpha, 0.f, false, NULL);
}

Loading…
Cancel
Save