From 24bb5b5ca88278275ad0c9808f105aff92d6aa74 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 23 Jun 2016 00:25:31 +0900 Subject: [PATCH] graphics: Stop comparing matrices in GLSL, which doesn't work on iPhone5s --- internal/graphics/shader.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/internal/graphics/shader.go b/internal/graphics/shader.go index dbaecfe27..55d6bdc21 100644 --- a/internal/graphics/shader.go +++ b/internal/graphics/shader.go @@ -58,15 +58,13 @@ varying highp vec2 vertex_out_tex_coord; void main(void) { lowp vec4 color = texture2D(texture, vertex_out_tex_coord); - if (color_matrix != mat4(1.0) || color_matrix_translation != vec4(0.0)) { - // Un-premultiply alpha - color.rgb /= color.a; - // Apply the color matrix - color = (color_matrix * color) + color_matrix_translation; - color = clamp(color, 0.0, 1.0); - // Premultiply alpha - color.rgb *= color.a; - } + // Un-premultiply alpha + color.rgb /= color.a; + // Apply the color matrix + color = (color_matrix * color) + color_matrix_translation; + color = clamp(color, 0.0, 1.0); + // Premultiply alpha + color.rgb *= color.a; gl_FragColor = color; }