glLight interferes with terrain textureing ?


Iโ€™m messing about with terrains generated from heightmaps.
The terrain is textured using texture combining depending on a color array (as specified in the terrain texturing tutorial on ).

Now I tried to place a standard OpenGL positional diffuse light (LIGHT0), but all texturing is different then, conform the LIGHT0 :slight_smile: :slight_smile: :slight_smile:

Any way to change this so I can use the light and still keep the correct terrain texturing ?

Thank you.

Nobody ?

I figure the GL lighting messes up my color arrayโ€ฆ is there any way to avoid this and still render the textured terrain with a light ?
Or do I have to render a 2nd pass with lighting ?


try GL_COLOR_MATERIAL. You could use your vertex colors as amb+diff or specular material instead of a normal glMaterial.



Ok, Iโ€™ll experiment with that a little :slight_smile: