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:
parent
7916dfb61d
commit
a1d748a0de
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user