From 8017f1b8338b9c744ab729a1d55d5f7a19205cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=94=BF?= Date: Mon, 23 Jul 2018 12:57:15 +0800 Subject: [PATCH] fix image repeation in gles2 --- src/nanovg_gl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nanovg_gl.h b/src/nanovg_gl.h index 30854ca2..be0f40c3 100644 --- a/src/nanovg_gl.h +++ b/src/nanovg_gl.h @@ -644,7 +644,7 @@ static int glnvg__renderCreate(void* uptr) "#ifdef NANOVG_GL3\n" " vec4 color = texture(tex, pt);\n" "#else\n" - " vec4 color = texture2D(tex, pt);\n" + " vec4 color = texture2D(tex, fract(pt));\n" "#endif\n" " if (texType == 1) color = vec4(color.xyz*color.w,color.w);" " if (texType == 2) color = vec4(color.x);"