PDA

View Full Version : Shading not working when texture used



JMENON
08-20-2010, 09: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
Jith

BionicBytes
08-20-2010, 11: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

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