   toon shader not working quite as expected
  I've been working on some simple shader programs to get a feel for how this stuff works.  I've got a basic toon shader up and running but for some reason the light direction used when calculating lighting in the shader seems to be off.  For example, if I set the light to be (0, 10, 0), I would expect the model to be lit from the top, but instead it is being lit from a light source directly opposite the camera (the -Z axis).  The X direction in OpenGL and in the shader are the same, but the Y and Z are not.  I have been looking at this for a while now and I can't figure out why.  Here is my OpenGL render function:glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Set viewport for the splash screen, so fill the whole window!!!glViewport(0, 0, WINDOW_SIZE_X, WINDOW_SIZE_Y);glMatrixMode(GL_PROJECTION);glLoadIdentity();gluPerspective(60.0, (float)WINDOW_SIZE_X / (float)WINDOW_SIZE_Y, 0.1, 1000.0); //update this so we dont get crappy distortionglMatrixMode(GL_MODELVIEW);glLoadIdentity();glPushMatrix();gluLookAt(0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);glutSolidTeapot(1.0f);glPopMatrix();glutSwapBuffers();Here's where I set the light direction variable for use in the shader:lightDirLoc= glGetUniformLocation(dwShaderProgram, "lightDir");//light will always stay in the same place, so just set it here...glUniform3f(lightDirLoc, 0.0f, 10.0f, 0.0f);Here is my vertex shader:varying vec3 normal;void main(){normal= gl_Normal;gl_Position= ftransform();}Here is my fragment shader:uniform vec3 lightDir;varying vec3 normal;void main() {float intensity;vec4 color;intensity = dot(normalize(lightDir), normalize(normal));if (intensity > 0.98)color = vec4(1.0, 0.5, 0.5, 1.0);else if (intensity > 0.9)color = vec4(0.8, 0.4, 0.4, 1.0);else if (intensity > 0.5)color = vec4(0.6, 0.3, 0.3, 1.0);else if (intensity > 0.25)color = vec4(0.4, 0.2, 0.2, 1.0);elsecolor = vec4(0.2, 0.1, 0.1, 1.0);gl_FragColor = color;}Does anybody know why my coordinates seem to be messed up?   
  Well, I just figured it out.  I wasn't calculating the normal correctly;  My new vertex shader looks like this:varying vec3 normal;void main(){normal= normalize(gl_NormalMatrix * gl_Normal);gl_Position= ftransform();}and now it is working properly.   