all repos — mgba @ 57a7a0a2911aaf28241efce70b12fc9add585dc3

mGBA Game Boy Advance Emulator

GBA Video: Fix rounding issues on Nvidia
Vicki Pfau vi@endrift.com
Tue, 21 May 2019 14:26:30 -0700
commit

57a7a0a2911aaf28241efce70b12fc9add585dc3

parent

84c010783c18fcb53ffddc83ba818055c90da758

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

jump to
M src/gba/renderers/gl.csrc/gba/renderers/gl.c

@@ -404,13 +404,13 @@

"void main() {\n" " vec2 incoord = texCoord;\n" " if (mosaic.x > 1) {\n" - " incoord.x = int(clamp(incoord.x - mod(mosaic.z + incoord.x, mosaic.x), 0, dims.z - 1));\n" + " incoord.x = clamp(incoord.x - int(mod(mosaic.z + incoord.x, mosaic.x)), 0, dims.z - 1);\n" " } else if (mosaic.x < -1) {\n" " incoord.x = dims.z - incoord.x - 1;" - " incoord.x = clamp(dims.z - int(incoord.x - mod(mosaic.z + incoord.x, -mosaic.x)) - 1, 0, dims.z - 1);\n" + " incoord.x = clamp(dims.z - incoord.x + int(mod(mosaic.z + incoord.x, -mosaic.x)) - 1, 0, dims.z - 1);\n" " }\n" " if (mosaic.y > 1) {\n" - " incoord.y = int(clamp(incoord.y - mod(mosaic.w + incoord.y, mosaic.y), 0, dims.w - 1));\n" + " incoord.y = clamp(incoord.y - int(mod(mosaic.w + incoord.y, mosaic.y)), 0, dims.w - 1);\n" " }\n" " ivec2 coord = ivec2(transform * (incoord - dims.zw / 2) + dims.xy / 2);\n" " if ((coord & ~(dims.xy - 1)) != ivec2(0, 0)) {\n"