Fix lens flare in side-by-side view

This commit is contained in:
James Urquhart 2016-05-21 19:52:41 +01:00
parent c6d2456a7c
commit 784f6f92d8
5 changed files with 21 additions and 1 deletions

View file

@ -277,8 +277,8 @@ bool LightFlareData::_testVisibility(const SceneRenderState *state, LightFlareSt
// the last result.
const Point3F &lightPos = flareState->lightMat.getPosition();
const RectI &viewport = RectI(Point2I(0, 0), GFX->getViewport().extent);
MatrixF camProjMatrix = state->getSceneManager()->getNonClipProjection();
MatrixF camProjMatrix = projMatrix = state->getSceneManager()->getNonClipProjection();
bool onScreen = MathUtils::mProjectWorldToScreen( lightPos, outLightPosSS, viewport, GFX->getWorldMatrix(), camProjMatrix );
// It is onscreen, so raycast as a simple occlusion test.