From 74bef2ff951ef2a29fb4db72f1eed2667f58e234 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 7 Feb 2017 17:34:02 +0100 Subject: [PATCH] Fix OpenGL 2.0 fallback shader for Layer View --- plugins/LayerView/layers.shader | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/LayerView/layers.shader b/plugins/LayerView/layers.shader index 88717e8774..81d5c94dff 100644 --- a/plugins/LayerView/layers.shader +++ b/plugins/LayerView/layers.shader @@ -5,8 +5,8 @@ vertex = uniform lowp float u_shade_factor; uniform highp int u_layer_view_type; - attribute highp int a_extruder; - attribute highp int a_line_type; + attribute highp float a_extruder; + attribute highp float a_line_type; attribute highp vec4 a_vertex; attribute lowp vec4 a_color; attribute lowp vec4 a_material_color; @@ -18,7 +18,7 @@ vertex = { gl_Position = u_modelViewProjectionMatrix * a_vertex; v_color = a_color; - if ((a_line_type != 8) && (a_line_type != 9)) { + if ((a_line_type != 8.0) && (a_line_type != 9.0)) { v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a); } @@ -66,7 +66,7 @@ fragment = discard; } - gl_FragColor = u_color; + gl_FragColor = v_color; } vertex41core =