mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Converted layers3d.shader to 41core spec. Contributes to CURA-3273
This commit is contained in:
parent
e31a695061
commit
4bb8e1b025
1 changed files with 27 additions and 25 deletions
|
@ -1,5 +1,5 @@
|
||||||
[shaders]
|
[shaders]
|
||||||
vertex =
|
vertex41core =
|
||||||
#version 410
|
#version 410
|
||||||
uniform highp mat4 u_modelMatrix;
|
uniform highp mat4 u_modelMatrix;
|
||||||
uniform highp mat4 u_viewProjectionMatrix;
|
uniform highp mat4 u_viewProjectionMatrix;
|
||||||
|
@ -9,27 +9,27 @@ vertex =
|
||||||
|
|
||||||
uniform highp mat4 u_normalMatrix;
|
uniform highp mat4 u_normalMatrix;
|
||||||
|
|
||||||
attribute highp vec4 a_vertex;
|
in highp vec4 a_vertex;
|
||||||
attribute lowp vec4 a_color;
|
in lowp vec4 a_color;
|
||||||
attribute lowp vec4 a_material_color;
|
in lowp vec4 a_material_color;
|
||||||
attribute highp vec4 a_normal;
|
in highp vec4 a_normal;
|
||||||
attribute highp vec2 a_line_dim; // line width and thickness
|
in highp vec2 a_line_dim; // line width and thickness
|
||||||
attribute highp int a_extruder;
|
in highp int a_extruder;
|
||||||
attribute highp int a_line_type;
|
in highp int a_line_type;
|
||||||
|
|
||||||
varying lowp vec4 v_color;
|
out lowp vec4 v_color;
|
||||||
|
|
||||||
varying highp vec3 v_vertex;
|
out highp vec3 v_vertex;
|
||||||
varying highp vec3 v_normal;
|
out highp vec3 v_normal;
|
||||||
varying lowp vec2 v_line_dim;
|
out lowp vec2 v_line_dim;
|
||||||
varying highp int v_extruder;
|
out highp int v_extruder;
|
||||||
varying highp vec4 v_extruder_opacity;
|
out highp vec4 v_extruder_opacity;
|
||||||
varying int v_line_type;
|
out int v_line_type;
|
||||||
|
|
||||||
varying lowp vec4 f_color;
|
out lowp vec4 f_color;
|
||||||
varying highp vec3 f_vertex;
|
out highp vec3 f_vertex;
|
||||||
varying highp vec3 f_normal;
|
out highp vec3 f_normal;
|
||||||
varying highp int f_extruder;
|
out highp int f_extruder;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ vertex =
|
||||||
f_normal = v_normal;*/
|
f_normal = v_normal;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
geometry =
|
geometry41core =
|
||||||
#version 410
|
#version 410
|
||||||
|
|
||||||
uniform highp mat4 u_viewProjectionMatrix;
|
uniform highp mat4 u_viewProjectionMatrix;
|
||||||
|
@ -285,11 +285,13 @@ geometry =
|
||||||
EndPrimitive();
|
EndPrimitive();
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment =
|
fragment41core =
|
||||||
#version 410
|
#version 410
|
||||||
varying lowp vec4 f_color;
|
in lowp vec4 f_color;
|
||||||
varying lowp vec3 f_normal;
|
in lowp vec3 f_normal;
|
||||||
varying lowp vec3 f_vertex;
|
in lowp vec3 f_vertex;
|
||||||
|
|
||||||
|
out vec4 frag_color;
|
||||||
|
|
||||||
uniform mediump vec4 u_ambientColor;
|
uniform mediump vec4 u_ambientColor;
|
||||||
uniform highp vec3 u_lightPosition;
|
uniform highp vec3 u_lightPosition;
|
||||||
|
@ -309,7 +311,7 @@ fragment =
|
||||||
finalColor += (NdotL * f_color);
|
finalColor += (NdotL * f_color);
|
||||||
finalColor.a = alpha; // Do not change alpha in any way
|
finalColor.a = alpha; // Do not change alpha in any way
|
||||||
|
|
||||||
gl_FragColor = finalColor;
|
frag_color = finalColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue