diff options
author | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-27 20:17:07 +0300 |
---|---|---|
committer | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-27 20:17:07 +0300 |
commit | b51b6997155b7d074e0e8112b3afedac13ba5d94 (patch) | |
tree | e96843a579194f50153e26808db046ca766a8bbe /resources/shaders | |
parent | 0e633a0dfaa202e4b95720d99428a5f4c790301a (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.shader | 6 |
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 |