all repos — mgba @ f27880525557deaf3b88af95655b8aef3c4a01de

mGBA Game Boy Advance Emulator

Fix x indexing into VRAM
Jeffrey Pfau jeffrey@endrift.com
Tue, 07 May 2013 21:48:46 -0700
commit

f27880525557deaf3b88af95655b8aef3c4a01de

parent

5388fb8cea38ebf8158d0f7ad8bd202e966f8e14

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/renderers/video-glsl.csrc/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"