Set Texture::setMaxAnisotropy() to 16.0f for better quality terrain when looking at shallow angle.

This commit is contained in:
Robert Osfield 2008-03-28 18:42:03 +00:00
parent f42497bc2b
commit 960e0bd378

View File

@ -669,6 +669,7 @@ void GeometryTechnique::applyColorLayers()
{ {
texture2D = new osg::Texture2D; texture2D = new osg::Texture2D;
texture2D->setImage(image); texture2D->setImage(image);
texture2D->setMaxAnisotropy(16.0f);
texture2D->setResizeNonPowerOfTwoHint(false); texture2D->setResizeNonPowerOfTwoHint(false);
texture2D->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR); texture2D->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR);
texture2D->setFilter(osg::Texture::MAG_FILTER, colorLayer->getFilter()==Layer::LINEAR ? osg::Texture::LINEAR : osg::Texture::NEAREST); texture2D->setFilter(osg::Texture::MAG_FILTER, colorLayer->getFilter()==Layer::LINEAR ? osg::Texture::LINEAR : osg::Texture::NEAREST);