From a1d748a0de8f920f6930cb3772d9da3f183d6a03 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sun, 24 Oct 2021 21:25:08 +0100 Subject: [PATCH] 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. --- simgear/scene/material/matlib.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index e9bc2dcc..43d6c9d9 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -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);