here's my shader :

vertex:

varying vec3 v; void main(void) { v = vec3(gl_ModelViewMatrix * gl_Vertex); gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; }

fragment:

varying vec2 vTexCoord; varying vec3 v; uniform sampler2D Texture; uniform sampler2D normalTexture; void main(void) { vec3 normal = normalize(texture2D(normalTexture, gl_TexCoord[0].st).rgb * 2.0 - 1.0); normal = normalize (normal); vec3 lightpos = normalize(gl_LightSource[0].position.xyz - v); vec3 eyevec = normalize(-v); vec3 reflection = normalize(-reflect(lightpos, normal)); vec4 ambient, specular, diffuse; vec4 texcolor = texture2D(Texture, vec2(gl_TexCoord[0])); vec4 finalcolor; float L_Term = dot(normal, lightpos); ambient = (gl_FrontLightModelProduct.sceneColor * gl_FrontMaterial.ambient) + gl_FrontLightProduct[0].ambient * gl_FrontMaterial.ambient; if(L_Term > 0.0) { specular = gl_LightSource[0].specular * gl_FrontMaterial.specular * (pow( max(dot(reflection, eyevec), 0.0), gl_FrontMaterial.shininess )); diffuse = gl_FrontLightProduct[0].diffuse * gl_FrontMaterial.diffuse * max(dot(normal, lightpos), 0.0); finalcolor = (texcolor) * (ambient + specular + diffuse); } else { finalcolor = (texcolor) * ambient; } gl_FragColor = finalcolor; }

so what did I do wrong?