View Full Version : Shading not working when texture used

08-20-2010, 08:45 AM
Hi All,

I have a terrain which is created by a triangular mesh. This has normals worked out and set properly.
I have lighting in place
When I dont use textures, the shading on this terrain works brilliantly with correct specular and diffused reflections happening.
Once I switch on/apply the texture on the mesh, the effect of shading is gone...
Do anyone have any clues on why this might be happening!!!!!

Thanks in advance

08-20-2010, 10:33 AM
Are you using fixed function or shaders?
I suspect fixed function - in which case what is the TexEnvi set to with glTexEnvi? I bet you have used GL_REPLACE - inwhich case switch it to GL_MODULATE

08-20-2010, 05:10 PM
You hit spot ON..
Thanks a lot..