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.
This commit is contained in:
Tim Kuipers 2020-02-27 18:17:07 +01:00
parent 0e633a0dfa
commit b51b699715
3 changed files with 16 additions and 10 deletions

View file

@ -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