graphics: Call roundTexel only on linear filter (#461)

This commit is contained in:
Hajime Hoshi 2017-12-21 00:38:22 +09:00
parent 8e72906f3d
commit 0a99103bc1

View File

@ -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;