diff options
author | Tim Kuipers <t.kuipers@ultimaker.com> | 2019-10-21 18:34:23 +0300 |
---|---|---|
committer | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-27 18:41:13 +0300 |
commit | fc4c66b62a7173d1260e40c121bc6133fbca6a88 (patch) | |
tree | 5b34b01c2e51fb1412e919d1c89c2add12a9ddb6 /resources/shaders | |
parent | b3761c454bba281517f1cd21d3fa4d669c7e39ba (diff) |
show xray errors in solid view
Diffstat (limited to 'resources/shaders')
-rw-r--r-- | resources/shaders/xray.shader | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/resources/shaders/xray.shader b/resources/shaders/xray.shader new file mode 100644 index 0000000000..45cb16c44c --- /dev/null +++ b/resources/shaders/xray.shader @@ -0,0 +1,55 @@ +[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 |