From 6ea99e43f10846dc751979813bea17ce14c220c1 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Fri, 5 Nov 2021 01:12:01 +0000 Subject: [PATCH] WS30: Use NEAREST_MIPMAP_NEAREST for landclass Only for the MIN filter, as the MAX filter causes significant interpolation issues. --- simgear/scene/tgdb/VPBTechnique.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simgear/scene/tgdb/VPBTechnique.cxx b/simgear/scene/tgdb/VPBTechnique.cxx index a65a6b65..b36ad0bb 100644 --- a/simgear/scene/tgdb/VPBTechnique.cxx +++ b/simgear/scene/tgdb/VPBTechnique.cxx @@ -1314,7 +1314,9 @@ void VPBTechnique::applyColorLayers(BufferData& buffer, Locator* masterLocator) texture2D->setMaxAnisotropy(16.0f); texture2D->setResizeNonPowerOfTwoHint(false); - texture2D->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST); + // Use mipmaps only in the minimization case because on magnification this results + // in bad interpolation of boundaries between landclasses + texture2D->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST_MIPMAP_NEAREST); texture2D->setFilter(osg::Texture::MAG_FILTER, osg::Texture::NEAREST); texture2D->setWrap(osg::Texture::WRAP_S,osg::Texture::CLAMP_TO_EDGE);