Fix off-by-one in mip levels for OpenGL

This commit is contained in:
Lukas Aldershaab 2021-01-02 18:19:26 +01:00
parent 3c165b7d45
commit 9caa08b7f0

View file

@ -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*/)