From f4d83cd9bddc70bed2bdb6ffda5cbe68b72c12ac Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sat, 19 Feb 2022 13:39:50 +0700 Subject: [PATCH] Ensure that mipmap shader will not try to load HD textures from atlas. --- .../GLSL/glsl_CombinerProgramUniformFactoryAccurate.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryAccurate.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryAccurate.cpp index 92582654..f9053ddd 100644 --- a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryAccurate.cpp +++ b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactoryAccurate.cpp @@ -116,8 +116,10 @@ public: maxTile = std::min(gSP.texture.level, 1u); // Hack for HD textures uMaxTile.set(maxTile, _force); - bool bNoAtlasTex = maxTile == 0 || gDP.otherMode.textureLOD != G_TL_LOD || - (gDP.otherMode.textureDetail != G_TD_DETAIL && maxTile == 1); + bool bNoAtlasTex = (_pTexture != nullptr && _pTexture->bHDTexture) || + maxTile == 0 || + gDP.otherMode.textureLOD != G_TL_LOD || + (gDP.otherMode.textureDetail != G_TD_DETAIL && maxTile == 1); uNoAtlasTex.set(bNoAtlasTex ? 1 : 0, _force); }