Yes, I was going to be getting to that eventually. This is still just a test app / for learning.First I would suggest writing these in a normal text editor and reading the shader in instead of how you have it. That is pretty ghetto.
But I don't want the alpha channel attenuated. If I did it that way I'd be able to see through the meshes.Second:
v_Color[0] = a_Color[0] * diffuse; \n"
+ " v_Color[1] = a_Color[1] * diffuse; \n"
+ " v_Color[2] = a_Color[2] * diffuse; \n"
+ " v_Color[3] = a_Color[3];
v_Color = a_Color*diffuse; //write this instead!
The sun vector changes very slowly over time but at the moment I'm just passing in constants for testing so it isn't that...Third, If you are passing in the sun vector, is it changing? Try:
vec3 nSunVector = normalize(vec3(1,1,1));
My problem is, I'm lighting the surfaces in world space before doing the rotations and transforming them, I know what I'm doing wrong, I just can't figure out how to do it right...