소스 검색

Fix off-by-one in mip levels for OpenGL

Lukas Aldershaab 5 년 전
부모
커밋
9caa08b7f0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Engine/source/gfx/gl/gfxGLUtils.h

+ 1 - 1
Engine/source/gfx/gl/gfxGLUtils.h

@@ -30,7 +30,7 @@
 
 inline U32 getMaxMipmaps(U32 width, U32 height, U32 depth)
 {
-   return getMax( getBinLog2(depth), getMax(getBinLog2(width), getBinLog2(height)));
+   return getMax( getBinLog2(depth), getMax(getBinLog2(width), getBinLog2(height))) + 1;
 }
 
 inline GLenum minificationFilter(U32 minFilter, U32 mipFilter, U32 /*mipLevels*/)