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.

This commit is contained in:
Ian Curtis 2023-10-31 23:50:19 +00:00
parent acab274526
commit 8fea5bd3bf

View file

@ -151,7 +151,7 @@ static const char s_fragmentShaderTileGen[] = R"glsl(
int GetLineScrollValue(int layerNum, int yCoord) int GetLineScrollValue(int layerNum, int yCoord)
{ {
int index = ((0xF6000 + (layerNum * 0x400)) / 4) + (yCoord / 2); 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); ivec2 coords = GetVRamCoords(index);
return int((texelFetch(vram,coords,0).r >> shift) & 0xFFFFu); return int((texelFetch(vram,coords,0).r >> shift) & 0xFFFFu);