Anisotropic filtering is now specified in materials.xml. Now we can have crisp textures wherever we want, without wasting time doing the calculations where not needed
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4892 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
7c2d181fc4
commit
f12641d33b
@ -60,6 +60,7 @@ Material::Material(const XMLNode *node, int index)
|
||||
node->get("reset", &m_resetter );
|
||||
node->get("max-speed", &m_max_speed_fraction);
|
||||
node->get("slowdown", &m_slowdown );
|
||||
node->get("anisotropic", &m_anisotropic );
|
||||
std::string s("");
|
||||
node->get("graphical-effect", &s );
|
||||
if(s=="water")
|
||||
@ -102,6 +103,7 @@ void Material::init(unsigned int index)
|
||||
m_lightmap = false;
|
||||
m_alpha_blending = false;
|
||||
m_lighting = true;
|
||||
m_anisotropic = false;
|
||||
m_sphere_map = false;
|
||||
m_friction = 1.0f;
|
||||
m_ignore = false;
|
||||
@ -159,8 +161,10 @@ void Material::setMaterialProperties(video::SMaterial *m) const
|
||||
m->SpecularColor = video::SColor(255, 255, 255, 255);
|
||||
}
|
||||
|
||||
//FIXME: only set on textures viewed at oblique angles, to avoid slowing down the game with this everywhere
|
||||
m->setFlag(video::EMF_ANISOTROPIC_FILTER, true);
|
||||
if (m_anisotropic)
|
||||
{
|
||||
m->setFlag(video::EMF_ANISOTROPIC_FILTER, true);
|
||||
}
|
||||
|
||||
#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7)
|
||||
|
||||
|
@ -46,6 +46,10 @@ private:
|
||||
bool m_sphere_map;
|
||||
bool m_alpha_testing;
|
||||
bool m_alpha_blending;
|
||||
|
||||
/** Whether to use anisotropic filtering for this texture */
|
||||
bool m_anisotropic;
|
||||
|
||||
/** True if lightmapping is enabled for this material. */
|
||||
bool m_lightmap;
|
||||
float m_friction;
|
||||
|
Loading…
Reference in New Issue
Block a user