mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 00:39:58 +00:00
Handle BSShader specular flag
This commit is contained in:
parent
62ef209185
commit
d6e420fb48
@ -139,6 +139,7 @@ namespace Nif
|
||||
float envMapIntensity{ 0.f };
|
||||
void read(NIFStream* nif) override;
|
||||
|
||||
bool specular() const { return flags1 & 1; }
|
||||
bool doubleSided() const { return (flags2 >> 4) & 1; }
|
||||
bool treeAnim() const { return (flags2 >> 29) & 1; }
|
||||
bool decal() const { return (flags1 >> 26) & 1; }
|
||||
|
@ -2472,6 +2472,12 @@ namespace NifOsg
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Nif::RC_BSShaderPPLightingProperty:
|
||||
{
|
||||
auto shaderprop = static_cast<const Nif::BSShaderPPLightingProperty*>(property);
|
||||
specEnabled = shaderprop->specular();
|
||||
break;
|
||||
}
|
||||
case Nif::RC_BSLightingShaderProperty:
|
||||
{
|
||||
auto shaderprop = static_cast<const Nif::BSLightingShaderProperty*>(property);
|
||||
@ -2481,6 +2487,7 @@ namespace NifOsg
|
||||
mat->setShininess(osg::Material::FRONT_AND_BACK, shaderprop->mGlossiness);
|
||||
emissiveMult = shaderprop->mEmissiveMult;
|
||||
specStrength = shaderprop->mSpecStrength;
|
||||
specEnabled = shaderprop->specular();
|
||||
if (shaderprop->decal())
|
||||
{
|
||||
osg::StateSet* stateset = node->getOrCreateStateSet();
|
||||
|
Loading…
x
Reference in New Issue
Block a user