From 0359a4e97f3175a39c437ed14eccaff55294dc52 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 25 Jun 2025 11:58:51 +0800 Subject: [PATCH] [Fix] (MG_State/Texture): get rid of 0.25 max lod clamp --- MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp index 843e630a..3efe86bc 100644 --- a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp +++ b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp @@ -334,6 +334,9 @@ namespace MG_GL::GL { // } Diligent::TextureDesc TexDesc; + if constexpr (MG_Global::Common::LogLevel <= MG_Constants::Common::LOG_LEVEL_DEBUG) { + TexDesc.Name = std::format("GL Texture {}", boundTextureID).c_str(); + } TexDesc.Type = Diligent::RESOURCE_DIM_TEX_2D; TexDesc.Width = width; TexDesc.Height = height; @@ -553,7 +556,7 @@ namespace MG_GL::GL { SamDesc.MinLOD = (float)param; break; case GL_TEXTURE_MAX_LOD: - SamDesc.MaxLOD = std::max((float)param, 0.25f); + SamDesc.MaxLOD = (float)param; break; case GL_TEXTURE_COMPARE_FUNC: SamDesc.ComparisonFunc = ConvertComparsionFunc(param);