forked from mirror/openmw-tes3mp
no sun glare in the reflection
This commit is contained in:
parent
393530e671
commit
ec3fe1ef00
4 changed files with 22 additions and 13 deletions
|
@ -47,6 +47,9 @@ enum VisibilityFlags
|
|||
|
||||
RV_Sky = 64,
|
||||
|
||||
// Sun glare (not visible in reflection)
|
||||
RV_Glare = 128,
|
||||
|
||||
RV_Map = RV_Terrain + RV_Statics + RV_StaticsSmall + RV_Misc + RV_Water,
|
||||
|
||||
/// \todo markers (normally hidden)
|
||||
|
|
|
@ -60,6 +60,11 @@ Vector3 BillboardObject::getPosition() const
|
|||
return Vector3(p.x, -p.z, p.y);
|
||||
}
|
||||
|
||||
void BillboardObject::setVisibilityFlags(int flags)
|
||||
{
|
||||
mBBSet->setVisibilityFlags(flags);
|
||||
}
|
||||
|
||||
void BillboardObject::setColour(const ColourValue& pColour)
|
||||
{
|
||||
mMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(pColour);
|
||||
|
@ -421,6 +426,7 @@ void SkyManager::create()
|
|||
mSun->setRenderQueue(RQG_SkiesEarly+4);
|
||||
mSunGlare = new BillboardObject("textures\\tx_sun_flash_grey_05.dds", 3, Vector3(0.4, 0.4, 0.4), mRootNode);
|
||||
mSunGlare->setRenderQueue(RQG_SkiesLate);
|
||||
mSunGlare->setVisibilityFlags(RV_Glare);
|
||||
|
||||
|
||||
HighLevelGpuProgramManager& mgr = HighLevelGpuProgramManager::getSingleton();
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace MWRender
|
|||
void setPosition(const Ogre::Vector3& pPosition);
|
||||
void setVisible(const bool visible);
|
||||
void setRenderQueue(unsigned int id);
|
||||
void setVisibilityFlags(int flags);
|
||||
void setSize(const float size);
|
||||
Ogre::Vector3 getPosition() const;
|
||||
|
||||
|
|
|
@ -139,14 +139,13 @@ Vector3 Water::getSceneNodeCoordinates(int gridX, int gridY)
|
|||
|
||||
void Water::preRenderTargetUpdate(const RenderTargetEvent& evt)
|
||||
{
|
||||
mWater->setVisible(false);
|
||||
|
||||
//mOldCameraFarClip = mCamera->getFarClipDistance();
|
||||
//if (mReflectDistance != 0)
|
||||
// mCamera->setFarClipDistance(mReflectDistance);
|
||||
|
||||
if (evt.source == mReflectionTarget)
|
||||
{
|
||||
mWater->setVisible(false);
|
||||
Vector3 pos = mCamera->getRealPosition();
|
||||
pos.y = mTop*2 - pos.y;
|
||||
mSky->setSkyPosition(pos);
|
||||
|
|
Loading…
Reference in a new issue