Renderer: Add mipmaps generation support

This commit is contained in:
SirLynix
2023-05-14 18:55:41 +02:00
parent 3712b641f8
commit 1d32af53c5
33 changed files with 488 additions and 183 deletions

View File

@@ -1351,7 +1351,7 @@ namespace Nz
UInt8 Image::GetMaxLevel(unsigned int width, unsigned int height, unsigned int depth)
{
// Le niveau maximal est le niveau requis pour la plus grande taille
return SafeCast<UInt8>(std::max(IntegralLog2(std::max({width, height, depth})), 1U));
return SafeCast<UInt8>(std::max(IntegralLog2(std::max({ width, height, depth })), 1U));
}
UInt8 Image::GetMaxLevel(ImageType type, unsigned int width, unsigned int height, unsigned int depth)