diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 3126343e5d..c24bdde5b2 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -951,8 +951,14 @@ void TextureCache::SetTextureFramebuffer(TexCacheEntry *entry) { glstate.Restore(); framebufferManager_->RebindFramebuffer(); - gstate_c.textureFullAlpha = false; - gstate_c.textureSimpleAlpha = gstate_c.textureFullAlpha; + const GEPaletteFormat clutFormat = gstate.getClutPaletteFormat(); + const u32 clutBase = gstate.getClutIndexStartPos(); + const u32 bytesPerColor = clutFormat == GE_CMODE_32BIT_ABGR8888 ? sizeof(u32) : sizeof(u16); + const u32 clutExtendedColors = (clutTotalBytes_ / bytesPerColor) + clutBase; + + TexCacheEntry::Status alphaStatus = CheckAlpha(clutBuf_, getClutDestFormat(gstate.getClutPaletteFormat()), clutExtendedColors, clutExtendedColors, 1); + gstate_c.textureFullAlpha = alphaStatus == TexCacheEntry::STATUS_ALPHA_FULL; + gstate_c.textureSimpleAlpha = alphaStatus == TexCacheEntry::STATUS_ALPHA_SIMPLE; } else { entry->status &= ~TexCacheEntry::STATUS_DEPALETTIZE; framebufferManager_->BindFramebufferColor(entry->framebuffer);