mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 13:49:39 +08:00
56 lines
1019 B
GLSL
56 lines
1019 B
GLSL
[shaders]
|
|
vertex =
|
|
uniform highp mat4 u_modelMatrix;
|
|
uniform highp mat4 u_viewMatrix;
|
|
uniform highp mat4 u_projectionMatrix;
|
|
|
|
attribute highp vec4 a_vertex;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
|
}
|
|
|
|
fragment =
|
|
uniform lowp vec4 u_color;
|
|
|
|
void main()
|
|
{
|
|
gl_FragColor = u_color;
|
|
}
|
|
|
|
vertex41core =
|
|
#version 410
|
|
uniform highp mat4 u_modelMatrix;
|
|
uniform highp mat4 u_viewMatrix;
|
|
uniform highp mat4 u_projectionMatrix;
|
|
|
|
in highp vec4 a_vertex;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
|
}
|
|
|
|
fragment41core =
|
|
#version 410
|
|
uniform lowp vec4 u_color;
|
|
|
|
out vec4 frag_color;
|
|
|
|
void main()
|
|
{
|
|
frag_color = u_color;
|
|
}
|
|
|
|
[defaults]
|
|
u_color = [0.02, 0.02, 0.02, 1.0]
|
|
|
|
[bindings]
|
|
u_modelMatrix = model_matrix
|
|
u_viewMatrix = view_matrix
|
|
u_projectionMatrix = projection_matrix
|
|
|
|
[attributes]
|
|
a_vertex = vertex
|