From ebfd9b3c4ee58768910f6530ddc1c46dfb45b9f0 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Mon, 6 Apr 2015 11:31:49 +0600 Subject: [PATCH] Enable texture mirror if real_size / size == 2 --- Textures.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Textures.cpp b/Textures.cpp index 3e2e17d7..02185a35 100644 --- a/Textures.cpp +++ b/Textures.cpp @@ -867,7 +867,7 @@ void TextureCache::_load(u32 _tile, CachedTexture *_pTexture) if (tmptex.maskS > 0) { clampSClamp = tmptex.clampS ? tmptex.clampWidth - 1 : (tmptex.mirrorS ? (tmptex.width << 1) - 1 : tmptex.width - 1); maskSMask = (1 << tmptex.maskS) - 1; - mirrorSBit = tmptex.mirrorS ? 1 << tmptex.maskS : 0; + mirrorSBit = (tmptex.mirrorS != 0 || tmptex.realWidth/tmptex.width == 2) ? 1 << tmptex.maskS : 0; } else { clampSClamp = min(tmptex.clampWidth, tmptex.width) - 1; maskSMask = 0xFFFF; @@ -877,7 +877,7 @@ void TextureCache::_load(u32 _tile, CachedTexture *_pTexture) if (tmptex.maskT > 0) { clampTClamp = tmptex.clampT ? tmptex.clampHeight - 1 : (tmptex.mirrorT ? (tmptex.height << 1) - 1 : tmptex.height - 1); maskTMask = (1 << tmptex.maskT) - 1; - mirrorTBit = tmptex.mirrorT ? 1 << tmptex.maskT : 0; + mirrorTBit = (tmptex.mirrorT != 0 || tmptex.realHeight/tmptex.height == 2) ? 1 << tmptex.maskT : 0; } else { clampTClamp = min(tmptex.clampHeight, tmptex.height) - 1; maskTMask = 0xFFFF;