forked from teamnwah/openmw-tes3coop
NifLoader: assign a name to created textures
This name will tell the shader visitor how to handle that texture.
This commit is contained in:
parent
50e92c8136
commit
4cd4131da9
1 changed files with 21 additions and 0 deletions
|
@ -1316,6 +1316,27 @@ namespace NifOsg
|
||||||
stateset->setTextureAttributeAndModes(texUnit, texEnv, osg::StateAttribute::ON);
|
stateset->setTextureAttributeAndModes(texUnit, texEnv, osg::StateAttribute::ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case Nif::NiTexturingProperty::BaseTexture:
|
||||||
|
texture2d->setName("diffuseMap");
|
||||||
|
break;
|
||||||
|
case Nif::NiTexturingProperty::BumpTexture:
|
||||||
|
texture2d->setName("normalMap");
|
||||||
|
break;
|
||||||
|
case Nif::NiTexturingProperty::GlowTexture:
|
||||||
|
texture2d->setName("emissiveMap");
|
||||||
|
break;
|
||||||
|
case Nif::NiTexturingProperty::DarkTexture:
|
||||||
|
texture2d->setName("darkMap");
|
||||||
|
break;
|
||||||
|
case Nif::NiTexturingProperty::DetailTexture:
|
||||||
|
texture2d->setName("detailMap");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
boundTextures.push_back(tex.uvSet);
|
boundTextures.push_back(tex.uvSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue