mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 23:08:00 +03:00
Add specular strength shader parameter
This commit is contained in:
parent
923756b407
commit
9880c43c86
6 changed files with 10 additions and 1 deletions
|
@ -1932,6 +1932,7 @@ namespace NifOsg
|
|||
|
||||
int lightmode = 1;
|
||||
float emissiveMult = 1.f;
|
||||
float specStrength = 1.f;
|
||||
|
||||
for (const Nif::Property* property : properties)
|
||||
{
|
||||
|
@ -2081,6 +2082,8 @@ namespace NifOsg
|
|||
stateset->setAttributeAndModes(mat, osg::StateAttribute::ON);
|
||||
if (emissiveMult != 1.f)
|
||||
stateset->addUniform(new osg::Uniform("emissiveMult", emissiveMult));
|
||||
if (specStrength != 1.f)
|
||||
stateset->addUniform(new osg::Uniform("specStrength", specStrength));
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -524,6 +524,7 @@ namespace Resource
|
|||
result.getNode()->accept(colladaAlphaTrickVisitor);
|
||||
|
||||
result.getNode()->getOrCreateStateSet()->addUniform(new osg::Uniform("emissiveMult", 1.f));
|
||||
result.getNode()->getOrCreateStateSet()->addUniform(new osg::Uniform("specStrength", 1.f));
|
||||
result.getNode()->getOrCreateStateSet()->addUniform(new osg::Uniform("envMapColor", osg::Vec4f(1,1,1,1)));
|
||||
result.getNode()->getOrCreateStateSet()->addUniform(new osg::Uniform("useFalloff", false));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue