From 078d107c2405f3f98468133fa503a6e02a2ecbd9 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 16 Dec 2017 03:28:48 +0900 Subject: [PATCH] graphics: Bug fix: vertex position should be highp --- internal/graphics/shader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/graphics/shader.go b/internal/graphics/shader.go index cd473a4ba..1ffd598fe 100644 --- a/internal/graphics/shader.go +++ b/internal/graphics/shader.go @@ -63,7 +63,7 @@ precision mediump float; uniform sampler2D texture; uniform mat4 color_matrix; uniform vec4 color_matrix_translation; -uniform vec2 source_size; +uniform highp vec2 source_size; uniform int filter_type; varying highp vec2 varying_tex_coord; @@ -92,7 +92,7 @@ vec4 getColorAt(highp vec2 pos) { void main(void) { vec4 color = vec4(0, 0, 0, 0); - vec2 pos = roundTexel(varying_tex_coord); + highp vec2 pos = roundTexel(varying_tex_coord); if (filter_type == 1) { // Nearest neighbor color = getColorAt(pos);