From 8fea5bd3bf615b00953f74f8e7ad174605492814 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Tue, 31 Oct 2023 23:50:19 +0000 Subject: [PATCH] gm_mathew - the line scroll values, the top 16bits are the even lines, the bottom 16bits are the odd lines. We had it swapped. This fixes the number below the word results in daytona, when you finish a game. --- Src/Graphics/Shaders2D.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Graphics/Shaders2D.h b/Src/Graphics/Shaders2D.h index 0c0c63f..f0fc3f4 100644 --- a/Src/Graphics/Shaders2D.h +++ b/Src/Graphics/Shaders2D.h @@ -151,7 +151,7 @@ static const char s_fragmentShaderTileGen[] = R"glsl( int GetLineScrollValue(int layerNum, int yCoord) { int index = ((0xF6000 + (layerNum * 0x400)) / 4) + (yCoord / 2); - int shift = (yCoord % 2) * 16; // double check this + int shift = (1 - (yCoord % 2)) * 16; ivec2 coords = GetVRamCoords(index); return int((texelFetch(vram,coords,0).r >> shift) & 0xFFFFu);