1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 16:45:34 +00:00

fix emissives in character preview

This commit is contained in:
glassmancody.info 2022-07-03 18:46:22 -07:00
parent f3dfb5d939
commit 9a0e9ac4fe

View file

@ -268,12 +268,15 @@ namespace MWRender
fog->setEnd(10000000);
stateset->setAttributeAndModes(fog, osg::StateAttribute::OFF|osg::StateAttribute::OVERRIDE);
// turn of sky blending
// TODO: Clean up this mess of loose uniforms that shaders depend on.
// turn off sky blending
stateset->addUniform(new osg::Uniform("far", 10000000.0f));
stateset->addUniform(new osg::Uniform("skyBlendingStart", 8000000.0f));
stateset->addUniform(new osg::Uniform("sky", 0));
stateset->addUniform(new osg::Uniform("screenRes", osg::Vec2f{1, 1}));
stateset->addUniform(new osg::Uniform("emissiveMult", 1.f));
// Opaque stuff must have 1 as its fragment alpha as the FBO is translucent, so having blending off isn't enough
osg::ref_ptr<osg::TexEnvCombine> noBlendAlphaEnv = new osg::TexEnvCombine();
noBlendAlphaEnv->setCombine_Alpha(osg::TexEnvCombine::REPLACE);