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

Fix calculation of clamping parameters for texture engine:

use integer part of tile coordinates to calculate tile dimensions.

Fixed texture glitches io topgear overdrive, #2464
This commit is contained in:
Sergey Lipskiy 2021-03-17 22:29:34 +07:00
parent e31b7b7045
commit d27ce4781f

View File

@ -1015,8 +1015,8 @@ public:
} else {
aTexWrap[t][0] = f32(1 << pTile->masks) * pTexture->hdRatioS;
aTexWrap[t][1] = f32(1 << pTile->maskt) * pTexture->hdRatioT;
aTexClamp[t][0] = (pTile->flrs - pTile->fuls + 1.0f) * pTexture->hdRatioS - 1.0f;
aTexClamp[t][1] = (pTile->flrt - pTile->fult + 1.0f) * pTexture->hdRatioT - 1.0f;
aTexClamp[t][0] = f32(pTile->lrs - pTile->uls + 1) * pTexture->hdRatioS - 1.0f;
aTexClamp[t][1] = f32(pTile->lrt - pTile->ult + 1) * pTexture->hdRatioT - 1.0f;
aTexWrapEn[t][0] = f32(pTile->masks == 0 ? 0 : 1);
aTexWrapEn[t][1] = f32(pTile->maskt == 0 ? 0 : 1);
aTexClampEn[t][0] = f32(gDP.otherMode.cycleType == G_CYC_COPY ? 0 : (pTile->masks == 0 ? 1 : pTile->clamps));