mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:23:53 +00:00
Add none texture filtering .It is fixes a bug with black objects in shaders glsles
This commit is contained in:
parent
744c56943a
commit
f75721a217
3 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,10 @@ namespace
|
||||||
return "Anisotropic";
|
return "Anisotropic";
|
||||||
else if (val == "bilinear")
|
else if (val == "bilinear")
|
||||||
return "Bilinear";
|
return "Bilinear";
|
||||||
else
|
else if (val == "trilinear")
|
||||||
return "Trilinear";
|
return "Trilinear";
|
||||||
|
else if (val == "none")
|
||||||
|
return "None";
|
||||||
}
|
}
|
||||||
|
|
||||||
void parseResolution (int &x, int &y, const std::string& str)
|
void parseResolution (int &x, int &y, const std::string& str)
|
||||||
|
|
|
@ -122,7 +122,7 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
|
||||||
if (filter == "anisotropic") tfo = TFO_ANISOTROPIC;
|
if (filter == "anisotropic") tfo = TFO_ANISOTROPIC;
|
||||||
else if (filter == "trilinear") tfo = TFO_TRILINEAR;
|
else if (filter == "trilinear") tfo = TFO_TRILINEAR;
|
||||||
else if (filter == "bilinear") tfo = TFO_BILINEAR;
|
else if (filter == "bilinear") tfo = TFO_BILINEAR;
|
||||||
else /*if (filter == "none")*/ tfo = TFO_NONE;
|
else if (filter == "none") tfo = TFO_NONE;
|
||||||
|
|
||||||
MaterialManager::getSingleton().setDefaultTextureFiltering(tfo);
|
MaterialManager::getSingleton().setDefaultTextureFiltering(tfo);
|
||||||
MaterialManager::getSingleton().setDefaultAnisotropy( (filter == "anisotropic") ? Settings::Manager::getInt("anisotropy", "General") : 1 );
|
MaterialManager::getSingleton().setDefaultAnisotropy( (filter == "anisotropic") ? Settings::Manager::getInt("anisotropy", "General") : 1 );
|
||||||
|
|
|
@ -324,6 +324,7 @@
|
||||||
<Property key="AddItem" value="Bilinear"/>
|
<Property key="AddItem" value="Bilinear"/>
|
||||||
<Property key="AddItem" value="Trilinear"/>
|
<Property key="AddItem" value="Trilinear"/>
|
||||||
<Property key="AddItem" value="Anisotropic"/>
|
<Property key="AddItem" value="Anisotropic"/>
|
||||||
|
<Property key="AddItem" value="None"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<Widget type="Widget" skin="" position="184 4 300 50" align="Left Top" name="AnisotropyBox">
|
<Widget type="Widget" skin="" position="184 4 300 50" align="Left Top" name="AnisotropyBox">
|
||||||
|
|
Loading…
Reference in a new issue