WS30: Fix filtering of texture atlas

Previously we were taking the nearest pixel from the nearest
mipmap.  Which was braindead.  Now just use the OSG defaults,
which are NEAREST_MIPMAP_LINEAR for MIN and LINEAR for MAX.

Thanks to Julian and Henning for helping diagnose this on
the weekly hangout.
This commit is contained in:
Stuart Buchanan 2021-10-24 21:25:08 +01:00
parent 7916dfb61d
commit a1d748a0de

View File

@ -382,9 +382,6 @@ SGMaterialCache::Atlas SGMaterialLib::getMaterialTextureAtlas(SGVec2f center, co
atlas.image->setMaxAnisotropy(SGSceneFeatures::instance()->getTextureFilter());
atlas.image->setResizeNonPowerOfTwoHint(false);
atlas.image->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST_MIPMAP_NEAREST);
atlas.image->setFilter(osg::Texture::MAG_FILTER, osg::Texture::NEAREST_MIPMAP_NEAREST);
atlas.image->setWrap(osg::Texture::WRAP_S,osg::Texture::REPEAT);
atlas.image->setWrap(osg::Texture::WRAP_T,osg::Texture::REPEAT);