PDA

View Full Version : glLight interferes with terrain textureing ?



Asshen
07-31-2004, 07:24 AM
Hello.

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 http://www.delphi3d.net ).

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

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

Thank you.
K.

Asshen
08-02-2004, 04:41 AM
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 ?

K.

propan
08-02-2004, 04:46 AM
try GL_COLOR_MATERIAL. You could use your vertex colors as amb+diff or specular material instead of a normal glMaterial.

HTH

thomas

Asshen
08-03-2004, 08:51 AM
Ok, I'll experiment with that a little :)

Thanks.