Fix x indexing into VRAM
Jeffrey Pfau jeffrey@endrift.com
Tue, 07 May 2013 21:48:46 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gba/renderers/video-glsl.c
→
src/gba/renderers/video-glsl.c
@@ -29,7 +29,7 @@ "uniform int bg2hofs;\n"
"uniform int bg2vofs;\n" "uniform int bg3hofs;\n" "uniform int bg3vofs;\n" - "#define VRAM_INDEX(i) (vec2(mod(float(i), 512.0) / 511.0, (160.0 + floor(float(i) / 512.0)) / 255.0))\n" + "#define VRAM_INDEX(i) (vec2(mod(float(i + 1), 512.0) / 512.0 - 1.0 / 1024.0, (160.0 + floor(float(i) / 512.0)) / 255.0))\n" "#define DESERIALIZE(vec) int(dot(vec4(63488.0, 1984.0, 62.0, 1.0), vec))\n" "vec4 backgroundMode0(int bgcnt, int hofs, int vofs) {\n"