From 74afd9f1149dfc65e3da145d3427157cd4e34e98 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Wed, 17 Jun 2015 22:58:03 +0600 Subject: [PATCH] Fix getTextureShiftScale for case of one-level mip-map. Fixed guard rail in Banjo Kazooie, #158 --- src/Textures.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Textures.cpp b/src/Textures.cpp index fa8e48a6..d3128ac1 100644 --- a/src/Textures.cpp +++ b/src/Textures.cpp @@ -1433,6 +1433,9 @@ void getTextureShiftScale(u32 t, const TextureCache & cache, f32 & shiftScaleS, return; } + if (gDP.otherMode.textureLOD == G_TL_LOD && gSP.texture.level == gSP.texture.tile) + t = 0; + if (gSP.textureTile[t]->shifts > 10) shiftScaleS = (f32)(1 << (16 - gSP.textureTile[t]->shifts)); else if (gSP.textureTile[t]->shifts > 0)