Sorry for the bad title, but I couldn't come up with anything better.
I have the following fragment shader code:
#version 430 core
out vec4 color;
uniform vec4 coords; //set to {1.f,1.f,1.f,1.f}
uniform vec3 values; //{time, a, b}
void main() {
float time = values[0];
float c;
c = coords[1]; //green
c = coords[1]*0.5f; //dark green
c = sin(time); //works like it should. moves between black and green.
c = time*1.0f; //quickly becomes green
c = 1.0f*coords[1]; //green
c = time*coords[1]; //black.
color = vec4(0,c,0,1);
}
However, I can't for the life of me manage to combine the variable time and any element in coords. It just becomes black. I.e. time*coords[1] never produces any color, even though coords[1] is always 1.0f and time quickly becomes large.
Edit: There are no errors when loading the shader.