Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kuipers <t.kuipers@ultimaker.com>2020-02-27 20:17:07 +0300
committerTim Kuipers <t.kuipers@ultimaker.com>2020-02-27 20:17:07 +0300
commitb51b6997155b7d074e0e8112b3afedac13ba5d94 (patch)
treee96843a579194f50153e26808db046ca766a8bbe /resources/shaders
parent0e633a0dfaa202e4b95720d99428a5f4c790301a (diff)
fix old xray view
I don't understand why it only seems to work if I define u_color via [default] andd why it doesn't work when I set it inside the shader itself.
Diffstat (limited to 'resources/shaders')
-rw-r--r--resources/shaders/xray.shader6
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/shaders/xray.shader b/resources/shaders/xray.shader
index 2f36a6fc0e..c375d4300c 100644
--- a/resources/shaders/xray.shader
+++ b/resources/shaders/xray.shader
@@ -12,7 +12,7 @@ vertex =
}
fragment =
- const lowp vec4 u_color = vec4(1.0 / 255.0, 0.0, 0.0, 1.0);
+ uniform vec4 u_color;
void main()
{
@@ -34,7 +34,8 @@ vertex41core =
fragment41core =
#version 410
- const lowp vec4 u_color = vec4(1.0 / 255.0, 0.0, 0.0, 1.0);
+
+ uniform vec4 u_color;
out vec4 frag_color;
@@ -44,6 +45,7 @@ fragment41core =
}
[defaults]
+u_color = [0.02, 0.02, 0.02, 1.0]
[bindings]
u_modelMatrix = model_matrix