1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Correct texture select when texture LOD is enabled but combiner does not use LOD.

Fixed tunel lamps in Top Gear Rally, #981
This commit is contained in:
Sergey Lipskiy 2016-05-10 21:44:03 +06:00
parent b0a01b26b7
commit d337f0a316

View File

@ -1411,6 +1411,12 @@ void TextureCache::update(u32 _t)
return;
}
if (gDP.otherMode.textureLOD == G_TL_LOD && gSP.texture.level == 0 && !currentCombiner()->usesLOD() && _t == 1) {
current[1] = current[0];
activateTexture(_t, current[_t]);
return;
}
if (gSP.texture.tile == 7 &&
_t == 0 &&
gSP.textureTile[0] == gDP.loadTile &&
@ -1530,6 +1536,9 @@ void getTextureShiftScale(u32 t, const TextureCache & cache, f32 & shiftScaleS,
return;
}
if (gDP.otherMode.textureLOD == G_TL_LOD && gSP.texture.level == 0 && !currentCombiner()->usesLOD())
t = 0;
if (gSP.textureTile[t]->shifts > 10)
shiftScaleS = (f32)(1 << (16 - gSP.textureTile[t]->shifts));
else if (gSP.textureTile[t]->shifts > 0)