mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 23:45:35 +00:00
SkyStereoStatesetUpdater was incorrectly always using reverseZ matrices.
This commit is contained in:
parent
00e02bb326
commit
7d057600ea
1 changed files with 3 additions and 3 deletions
|
@ -629,7 +629,7 @@ namespace MWRender
|
||||||
|
|
||||||
for (int view : {0, 1})
|
for (int view : {0, 1})
|
||||||
{
|
{
|
||||||
auto projectionMatrix = sm.computeEyeProjection(view, true);
|
auto projectionMatrix = sm.computeEyeProjection(view, SceneUtil::AutoDepth::isReversed());
|
||||||
auto viewOffsetMatrix = sm.computeEyeViewOffset(view);
|
auto viewOffsetMatrix = sm.computeEyeViewOffset(view);
|
||||||
for (int col : {0, 1, 2})
|
for (int col : {0, 1, 2})
|
||||||
viewOffsetMatrix(3, col) = 0;
|
viewOffsetMatrix(3, col) = 0;
|
||||||
|
@ -644,14 +644,14 @@ namespace MWRender
|
||||||
{
|
{
|
||||||
auto& sm = Stereo::Manager::instance();
|
auto& sm = Stereo::Manager::instance();
|
||||||
auto* projectionMatrixUniform = stateset->getUniform("projectionMatrix");
|
auto* projectionMatrixUniform = stateset->getUniform("projectionMatrix");
|
||||||
auto projectionMatrix = sm.computeEyeProjection(0, true);
|
auto projectionMatrix = sm.computeEyeProjection(0, SceneUtil::AutoDepth::isReversed());
|
||||||
projectionMatrixUniform->set(projectionMatrix);
|
projectionMatrixUniform->set(projectionMatrix);
|
||||||
}
|
}
|
||||||
void applyRight(osg::StateSet* stateset, osgUtil::CullVisitor* /*cv*/) override
|
void applyRight(osg::StateSet* stateset, osgUtil::CullVisitor* /*cv*/) override
|
||||||
{
|
{
|
||||||
auto& sm = Stereo::Manager::instance();
|
auto& sm = Stereo::Manager::instance();
|
||||||
auto* projectionMatrixUniform = stateset->getUniform("projectionMatrix");
|
auto* projectionMatrixUniform = stateset->getUniform("projectionMatrix");
|
||||||
auto projectionMatrix = sm.computeEyeProjection(1, true);
|
auto projectionMatrix = sm.computeEyeProjection(1, SceneUtil::AutoDepth::isReversed());
|
||||||
projectionMatrixUniform->set(projectionMatrix);
|
projectionMatrixUniform->set(projectionMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue