Просмотр исходного кода

Remove dead (shader) code.

These shader (files) are now only used for compatability mode. The 'modern' code is found in the '...3d.shader' versions of these files.
Remco Burema 3 лет назад
Родитель
Сommit
f486177465
2 измененных файлов с 0 добавлено и 143 удалено
  1. 0 71
      plugins/SimulationView/layers.shader
  2. 0 72
      plugins/SimulationView/layers_shadow.shader

+ 0 - 71
plugins/SimulationView/layers.shader

@@ -77,77 +77,6 @@ fragment =
         gl_FragColor = v_color;
     }
 
-vertex41core =
-    #version 410
-    uniform highp mat4 u_modelMatrix;
-    uniform highp mat4 u_viewMatrix;
-    uniform highp mat4 u_projectionMatrix;
-
-    uniform lowp float u_active_extruder;
-    uniform lowp float u_shade_factor;
-    uniform highp int u_layer_view_type;
-
-    in highp float a_extruder;
-    in highp float a_line_type;
-    in highp vec4 a_vertex;
-    in lowp vec4 a_color;
-    in lowp vec4 a_material_color;
-
-    out lowp vec4 v_color;
-    out float v_line_type;
-
-    void main()
-    {
-        gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
-        v_color = a_color;
-        if ((a_line_type != 8) && (a_line_type != 9)) {
-            v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a);
-        }
-
-        v_line_type = a_line_type;
-    }
-
-fragment41core =
-    #version 410
-    in lowp vec4 v_color;
-    in float v_line_type;
-    out vec4 frag_color;
-
-    uniform int u_show_travel_moves;
-    uniform int u_show_helpers;
-    uniform int u_show_skin;
-    uniform int u_show_infill;
-
-    void main()
-    {
-        if ((u_show_travel_moves == 0) && (v_line_type >= 7.5) && (v_line_type <= 9.5)) {  // actually, 8 and 9
-            // discard movements
-            discard;
-        }
-        // helpers: 4, 5, 7, 10
-        if ((u_show_helpers == 0) && (
-            ((v_line_type >= 3.5) && (v_line_type <= 4.5)) ||
-            ((v_line_type >= 6.5) && (v_line_type <= 7.5)) ||
-            ((v_line_type >= 9.5) && (v_line_type <= 10.5)) ||
-            ((v_line_type >= 4.5) && (v_line_type <= 5.5))
-            )) {
-            discard;
-        }
-        // skin: 1, 2, 3
-        if ((u_show_skin == 0) && (
-            (v_line_type >= 0.5) && (v_line_type <= 3.5)
-            )) {
-            discard;
-        }
-        // infill:
-        if ((u_show_infill == 0) && (v_line_type >= 5.5) && (v_line_type <= 6.5)) {
-            // discard movements
-            discard;
-        }
-
-        frag_color = v_color;
-    }
-
 [defaults]
 u_active_extruder = 0.0
 u_shade_factor = 0.60

+ 0 - 72
plugins/SimulationView/layers_shadow.shader

@@ -81,78 +81,6 @@ fragment =
         gl_FragColor = v_color;
     }
 
-vertex41core =
-    #version 410
-    uniform highp mat4 u_modelMatrix;
-    uniform highp mat4 u_viewMatrix;
-    uniform highp mat4 u_projectionMatrix;
-
-    uniform lowp float u_active_extruder;
-    uniform lowp float u_shade_factor;
-    uniform highp int u_layer_view_type;
-
-    in highp float a_extruder;
-    in highp float a_line_type;
-    in highp vec4 a_vertex;
-    in lowp vec4 a_color;
-    in lowp vec4 a_material_color;
-
-    out lowp vec4 v_color;
-    out float v_line_type;
-
-    void main()
-    {
-        gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
-        v_color = vec4(0.4, 0.4, 0.4, 0.9);    // default color for not current layer
-        // if ((a_line_type != 8) && (a_line_type != 9)) {
-        //     v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a);
-        // }
-
-        v_line_type = a_line_type;
-    }
-
-fragment41core =
-    #version 410
-    in lowp vec4 v_color;
-    in float v_line_type;
-    out vec4 frag_color;
-
-    uniform int u_show_travel_moves;
-    uniform int u_show_helpers;
-    uniform int u_show_skin;
-    uniform int u_show_infill;
-
-    void main()
-    {
-        if ((u_show_travel_moves == 0) && (v_line_type >= 7.5) && (v_line_type <= 9.5)) {  // actually, 8 and 9
-            // discard movements
-            discard;
-        }
-        // helpers: 4, 5, 7, 10, 11
-        if ((u_show_helpers == 0) && (
-            ((v_line_type >= 3.5) && (v_line_type <= 4.5)) ||
-            ((v_line_type >= 6.5) && (v_line_type <= 7.5)) ||
-            ((v_line_type >= 9.5) && (v_line_type <= 10.5)) ||
-            ((v_line_type >= 4.5) && (v_line_type <= 5.5)) ||
-            ((v_line_type >= 10.5) && (v_line_type <= 11.5))
-            )) {
-            discard;
-        }
-        // skin: 1, 2, 3
-        if ((u_show_skin == 0) && (
-            (v_line_type >= 0.5) && (v_line_type <= 3.5)
-            )) {
-            discard;
-        }
-        // infill:
-        if ((u_show_infill == 0) && (v_line_type >= 5.5) && (v_line_type <= 6.5)) {
-            // discard movements
-            discard;
-        }
-
-        frag_color = v_color;
-    }
-
 [defaults]
 u_active_extruder = 0.0
 u_shade_factor = 0.60