From 0a99103bc120699e549c01a90573a2f511864e72 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 21 Dec 2017 00:38:22 +0900 Subject: [PATCH] graphics: Call roundTexel only on linear filter (#461) --- internal/graphics/shader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/graphics/shader.go b/internal/graphics/shader.go index 4320b0e63..eb6fa77ad 100644 --- a/internal/graphics/shader.go +++ b/internal/graphics/shader.go @@ -99,7 +99,7 @@ highp vec2 roundTexel(highp vec2 p) { } void main(void) { - highp vec2 pos = roundTexel(varying_tex_coord); + highp vec2 pos = varying_tex_coord; #if defined(FILTER_NEAREST) vec4 color = texture2D(texture, pos); @@ -112,6 +112,7 @@ void main(void) { #endif #if defined(FILTER_LINEAR) + pos = roundTexel(pos); highp vec2 texel_size = 1.0 / source_size; pos -= texel_size * 0.5;