|
|
|
@ -32,6 +32,8 @@
|
|
|
|
|
#include <components/resource/imagemanager.hpp>
|
|
|
|
|
#include <components/resource/scenemanager.hpp>
|
|
|
|
|
#include <components/resource/keyframemanager.hpp>
|
|
|
|
|
|
|
|
|
|
#include <components/shader/removedalphafunc.hpp>
|
|
|
|
|
#include <components/shader/shadermanager.hpp>
|
|
|
|
|
|
|
|
|
|
#include <components/settings/settings.hpp>
|
|
|
|
@ -376,6 +378,9 @@ namespace MWRender
|
|
|
|
|
mRootNode->getOrCreateStateSet()->addUniform(new osg::Uniform("far", mViewDistance));
|
|
|
|
|
mRootNode->getOrCreateStateSet()->addUniform(new osg::Uniform("simpleWater", false));
|
|
|
|
|
|
|
|
|
|
// Hopefully, anything genuinely requiring the default alpha func of GL_ALWAYS explicitly sets it
|
|
|
|
|
mRootNode->getOrCreateStateSet()->setAttribute(Shader::RemovedAlphaFunc::getInstance(GL_GREATER));
|
|
|
|
|
|
|
|
|
|
mUniformNear = mRootNode->getOrCreateStateSet()->getUniform("near");
|
|
|
|
|
mUniformFar = mRootNode->getOrCreateStateSet()->getUniform("far");
|
|
|
|
|
updateProjectionMatrix();
|
|
|
|
|