I'm just working on some per fragment lighting, working in visual studio 2010 C++ and using GLSL, and for some reason, only this fragment shader is having issues, I have pass through fragment shaders that work, and all of my vertex shaders work, so it's something to do with this specific guy. Basically my shader looks like this:
#version 120
varying vec3 normal;
varying vec3 lightDir;
varying vec4 ambient;
varying vec4 diffuse;
void main()
{
float NdotL = max(dot(lightDir,normalize(normal)),0.0);
gl_FragColor = vec4((NdotL * diffuse.rgb + ambient.rgb), gl_FrontMaterial.diffuse.a);
}
Does anybody have any ideas to help? As I said, I already load multiple shaders into the program, but only this guy doesn't work
EDIT: Switched the vec3 to a float, still getting the same issue. HALP!