mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 06:15:32 +00:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
7129947674
3 changed files with 12 additions and 6 deletions
|
@ -333,11 +333,6 @@ Ogre::String NIFMaterialLoader::getMaterial(const Nif::ShapeData *shapedata,
|
||||||
instance->setProperty("use_detail_map", sh::makeProperty(new sh::BooleanValue(true)));
|
instance->setProperty("use_detail_map", sh::makeProperty(new sh::BooleanValue(true)));
|
||||||
instance->setProperty("detailMapUVSet", sh::makeProperty(new sh::IntValue(texprop->textures[Nif::NiTexturingProperty::DetailTexture].uvSet)));
|
instance->setProperty("detailMapUVSet", sh::makeProperty(new sh::IntValue(texprop->textures[Nif::NiTexturingProperty::DetailTexture].uvSet)));
|
||||||
}
|
}
|
||||||
if (!texName[Nif::NiTexturingProperty::BumpTexture].empty())
|
|
||||||
{
|
|
||||||
// force automips on normal maps for now
|
|
||||||
instance->setProperty("normalMap", sh::makeProperty(texName[Nif::NiTexturingProperty::BumpTexture] + " 4"));
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 0;i < 7;i++)
|
for(int i = 0;i < 7;i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#include <OgrePass.h>
|
#include <OgrePass.h>
|
||||||
|
|
||||||
|
#include <OgreStringConverter.h>
|
||||||
|
|
||||||
namespace sh
|
namespace sh
|
||||||
{
|
{
|
||||||
void OgreMaterialSerializer::reset()
|
void OgreMaterialSerializer::reset()
|
||||||
|
@ -44,6 +46,13 @@ namespace sh
|
||||||
|
|
||||||
bool OgreMaterialSerializer::setTextureUnitProperty (const std::string& param, std::string value, Ogre::TextureUnitState* t)
|
bool OgreMaterialSerializer::setTextureUnitProperty (const std::string& param, std::string value, Ogre::TextureUnitState* t)
|
||||||
{
|
{
|
||||||
|
// quick access to automip setting, without having to use 'texture' which doesn't like spaces in filenames
|
||||||
|
if (param == "num_mipmaps")
|
||||||
|
{
|
||||||
|
t->setNumMipmaps(Ogre::StringConverter::parseInt(value));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
mScriptContext.section = Ogre::MSS_TEXTUREUNIT;
|
mScriptContext.section = Ogre::MSS_TEXTUREUNIT;
|
||||||
|
|
|
@ -55,7 +55,9 @@ material openmw_objects_base
|
||||||
|
|
||||||
texture_unit normalMap
|
texture_unit normalMap
|
||||||
{
|
{
|
||||||
texture $normalMap
|
direct_texture $normalMap
|
||||||
|
// force automips here for now
|
||||||
|
num_mipmaps 4
|
||||||
}
|
}
|
||||||
|
|
||||||
texture_unit emissiveMap
|
texture_unit emissiveMap
|
||||||
|
|
Loading…
Reference in a new issue