mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-31 04:36:45 +00:00
Bad order of setting cull flags was masking out the sky.
This commit is contained in:
parent
1f76f93221
commit
81064043f7
3 changed files with 9 additions and 7 deletions
|
@ -805,7 +805,9 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
|||
// Stereo shader technique can be set up now.
|
||||
mStereoView->setStereoTechnique(Misc::getStereoTechnique());
|
||||
mStereoView->initializeScene();
|
||||
mStereoView->setCullMask(mViewer->getCamera()->getCullMask() & ~MWRender::VisMask::Mask_GUI);
|
||||
|
||||
if (mEnvironment.getVrMode())
|
||||
mStereoView->setCullMask(mStereoView->getCullMask() & ~MWRender::VisMask::Mask_GUI);
|
||||
}
|
||||
|
||||
window->setStore(mEnvironment.getWorld()->getStore());
|
||||
|
|
|
@ -266,6 +266,7 @@ namespace Misc
|
|||
, mMasterConfig(new SharedShadowMapConfig)
|
||||
, mSlaveConfig(new SharedShadowMapConfig)
|
||||
, mSharedShadowMaps(Settings::Manager::getBool("shared shadow maps", "Stereo"))
|
||||
, mUpdateViewCallback(new DefaultUpdateViewCallback)
|
||||
{
|
||||
mMasterConfig->_id = "STEREO";
|
||||
mMasterConfig->_master = true;
|
||||
|
@ -485,13 +486,12 @@ namespace Misc
|
|||
View right{};
|
||||
double near_ = 1.f;
|
||||
double far_ = 10000.f;
|
||||
auto updateViewCallback = mUpdateViewCallback.lock();
|
||||
if (!updateViewCallback)
|
||||
if (!mUpdateViewCallback)
|
||||
{
|
||||
Log(Debug::Error) << "StereoView: No update view callback. Stereo rendering will not work.";
|
||||
return;
|
||||
}
|
||||
updateViewCallback->updateView(left, right);
|
||||
mUpdateViewCallback->updateView(left, right);
|
||||
near_ = Settings::Manager::getFloat("near clip", "Camera");
|
||||
far_ = Settings::Manager::getFloat("viewing distance", "Camera");
|
||||
|
||||
|
@ -683,8 +683,8 @@ namespace Misc
|
|||
{
|
||||
left.pose.position = osg::Vec3(-2.2, 0, 0);
|
||||
right.pose.position = osg::Vec3(2.2, 0, 0);
|
||||
left.fov = { -0.767549932, 0.620896876, -0.837898076, 0.726982594 };
|
||||
right.fov = { -0.620896876, 0.767549932, -0.837898076, 0.726982594 };
|
||||
left.fov = { -0.767549932, 0.620896876, 0.726982594, -0.837898076 };
|
||||
right.fov = { -0.620896876, 0.767549932, 0.726982594, -0.837898076 };
|
||||
}
|
||||
|
||||
void StereoView::setInitialDrawCallback(osg::ref_ptr<osg::Camera::DrawCallback> cb)
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace Misc
|
|||
bool flipViewOrder{ true };
|
||||
|
||||
// Updates stereo configuration during the update pass
|
||||
std::weak_ptr<UpdateViewCallback> mUpdateViewCallback{};
|
||||
std::shared_ptr<UpdateViewCallback> mUpdateViewCallback;
|
||||
|
||||
// OSG camera callbacks set using set*callback. StereoView manages that these are always set on the appropriate camera(s);
|
||||
osg::ref_ptr<osg::NodeCallback> mCullCallback{ nullptr };
|
||||
|
|
Loading…
Reference in a new issue