mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 12:45:45 -04:00
GPU: Clamp coordinates to 11 bits after applying drawing offset
Fixes flickering in some scenes (e.g. Galbadia Missile Base).
This commit is contained in:
@ -251,10 +251,15 @@ protected:
|
||||
{
|
||||
u32 bits;
|
||||
|
||||
BitField<u32, s32, 0, 12> x;
|
||||
BitField<u32, s32, 16, 12> y;
|
||||
BitField<u32, s32, 0, 11> x;
|
||||
BitField<u32, s32, 16, 11> y;
|
||||
};
|
||||
|
||||
// Vertices have to be clamped to 11 bits before rendering. Normally this would happen as part of the scanline,
|
||||
// but in the hardware renderers we'll do it at the vertex. FF8 is a good test case here, once you go too far left
|
||||
// in the first scene of Galbadia Missile Base, the screen will flicker.
|
||||
ALWAYS_INLINE static s32 VertexPositionToVRAMCoordinate(s32 x) { return SignExtendN<11, s32>(x); }
|
||||
|
||||
union VRAMPixel
|
||||
{
|
||||
u16 bits;
|
||||
|
Reference in New Issue
Block a user