mirror of
https://github.com/BluestormDNA/ProjectPSX.git
synced 2025-04-02 10:52:34 -04:00
GPU: clamp to 0xFF x y texel coords
This fixes FF7 menus glitches
This commit is contained in:
parent
0b551e00c7
commit
daec73937a
1 changed files with 3 additions and 0 deletions
|
@ -1022,6 +1022,9 @@ namespace ProjectPSX.Devices {
|
|||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private int getTexel(int x, int y, Point2D clut, Point2D textureBase, int depth) {
|
||||
x &= 0xFF;
|
||||
y &= 0xFF;
|
||||
|
||||
// Texture masking: texel = (texel AND(NOT(Mask * 8))) OR((Offset AND Mask) * 8)
|
||||
x = (x & ~(textureWindowMaskX * 8)) | ((textureWindowOffsetX & textureWindowMaskX) * 8);
|
||||
y = (y & ~(textureWindowMaskY * 8)) | ((textureWindowOffsetY & textureWindowMaskY) * 8);
|
||||
|
|
Loading…
Add table
Reference in a new issue