1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Add support for TEXTUREMODE_BGIMAGE in UClampWrapMirrorTex::update()

Fixed #2107 Majora's Mask OnePiece backgrounds broken
Fixed #2141 RE2 corrupt video
This commit is contained in:
Sergey Lipskiy 2019-11-28 19:13:26 +07:00
parent 558c465d02
commit 2b5e8786d1

View File

@ -940,7 +940,8 @@ public:
if (gDP.otherMode.cycleType != G_CYC_COPY) {
if (pTexture->clampS) {
aTexClamp[t][0] = 0.0f; // S lower bound
if (pTexture->frameBufferTexture != CachedTexture::fbNone)
if (pTexture->frameBufferTexture != CachedTexture::fbNone ||
pTile->textureMode == TEXTUREMODE_BGIMAGE)
aTexClamp[t][2] = 1.0f;
else {
u32 tileWidth = ((pTile->lrs - pTile->uls) & 0x03FF) + 1;
@ -952,7 +953,8 @@ public:
}
if (pTexture->clampT) {
aTexClamp[t][1] = 0.0f; // T lower bound
if (pTexture->frameBufferTexture != CachedTexture::fbNone)
if (pTexture->frameBufferTexture != CachedTexture::fbNone ||
pTile->textureMode == TEXTUREMODE_BGIMAGE)
aTexClamp[t][3] = 1.0f;
else {
const u32 tileHeight = ((pTile->lrt - pTile->ult) & 0x03FF) + 1;