From 2b5f14754577c351e44cc8e18875b4abdb04c7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Thu, 16 Nov 2017 20:06:34 +0100 Subject: [PATCH] allow non-power-of-2 sized cubemaps --- apps/openmw/mwrender/renderingmanager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 18d2dea2a..92480f45b 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -683,9 +683,6 @@ namespace MWRender else if (screenshotMapping == 2) screenshotH = screenshotW; // use square resolution for planet mapping - if (!rawCubemap) - cubeSize = pow(2,round(log2(cubeSize))); // select closest power of 2 for GPU - std::vector> images; for (int i = 0; i < 6; ++i) @@ -745,6 +742,7 @@ namespace MWRender // run on GPU now: osg::ref_ptr cubeTexture (new osg::TextureCubeMap); + cubeTexture->setResizeNonPowerOfTwoHint(false); cubeTexture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); cubeTexture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);