From c678d9fa7154dbf9d226d90e470d9100788842ae Mon Sep 17 00:00:00 2001 From: Venomalia Date: Thu, 5 Oct 2023 18:05:37 +0200 Subject: [PATCH] C8 Texture-Tlut-Hash remains constant when the transparency flag is used. --- Source/Core/VideoCommon/TextureInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/TextureInfo.cpp b/Source/Core/VideoCommon/TextureInfo.cpp index b73461ba33..82770ea33c 100644 --- a/Source/Core/VideoCommon/TextureInfo.cpp +++ b/Source/Core/VideoCommon/TextureInfo.cpp @@ -135,7 +135,9 @@ TextureInfo::NameDetails TextureInfo::CalculateTextureName() const const u32 texture_byte = m_ptr[i]; min = std::min(min, texture_byte); - max = std::max(max, texture_byte); + // The value 255 can be used as a transparency flag if the tlut is smaller than 255. + if (texture_byte != 255 || max == 254) + max = std::max(max, texture_byte); } break; }