소스 검색

skip mip calculation for non pow2 textures if it's not for a rendertarget

AzaezelX 1 개월 전
부모
커밋
7fcdd03b50
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Engine/source/gfx/gfxTextureManager.cpp

+ 1 - 1
Engine/source/gfx/gfxTextureManager.cpp

@@ -1418,7 +1418,7 @@ void GFXTextureManager::_validateTexParams( const U32 width, const U32 height,
    {
       // If a texture is not power-of-2 in size for both dimensions, it must
       // have only 1 mip level.
-      inOutNumMips = mFloor(mLog2(mMax(width, height))) + 1;
+      inOutNumMips = profile->isRenderTarget() ? mFloor(mLog2(mMax(width, height))) + 1 : 1;
    }
 
    // Check format, and compatibility with texture profile requirements