From ab669a434efb3f9c42667f60bcdac68ccb151a49 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 30 Oct 2017 19:54:54 +0000 Subject: [PATCH] Update the shadow frustrum bounds properly --- apps/openmw/mwrender/shadow.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/shadow.cpp b/apps/openmw/mwrender/shadow.cpp index b8600e2116..089a4da3d3 100644 --- a/apps/openmw/mwrender/shadow.cpp +++ b/apps/openmw/mwrender/shadow.cpp @@ -227,6 +227,19 @@ namespace MWRender popCurrentMask(); } + void apply(osg::Drawable& drawable) + { + if (isCulled(drawable)) return; + + // push the culling mode. + pushCurrentMask(); + + updateBound(drawable.getBoundingBox()); + + // pop the culling mode. + popCurrentMask(); + } + void apply(osg::Billboard&) { OSG_INFO << "Warning Billboards not yet supported" << std::endl; @@ -547,7 +560,7 @@ namespace MWRender { osg::ref_ptr texture = sd->_texture; osg::ref_ptr stateSet = debugGeometry->getOrCreateStateSet(); - if (false) + if (true) stateSet->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); else stateSet->setTextureAttributeAndModes(0, testTex, osg::StateAttribute::ON);