WS30: Use NEAREST_MIPMAP_NEAREST for landclass

Only for the MIN filter, as the MAX filter causes
significant interpolation issues.
This commit is contained in:
Stuart Buchanan 2021-11-05 01:12:01 +00:00
parent 1553ac2e17
commit 6ea99e43f1

View File

@ -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);