View Full Version : best normal mapping technique for Open GL 1.4?

07-05-2005, 08:27 AM
Is per pixel lighting supported directly in 1.4 or are extensions required? I mean the non-interpolated lighting with the blue textures (normal maps).

I did find a GL_NORMAL_MAP constant but it seems to be poorly documented in the Red Book and Blue Book and online and might be completely unrelated?

Ideally I want to avoid shaders and extensions and OpenGL 2.0 for now.


07-05-2005, 11:02 AM
use the GL_DOT3 combiner (became part gl1.3 or 1.4) + i dont know what GL_NORMAL_MAP is, part of register combiners perhaps? anyways is prolly the single most discussed opengl topic so u should find a few examples on the internet easily enuf

07-05-2005, 11:44 AM
GL_NORMAL_MAP is for texgen and came with ARB_texture_cube_map

as zed mentioned look into ARB_texture_env_combine and ARB_texture_env_dot3 extensions

07-05-2005, 02:28 PM
My v1.4 Red Book covers texture combiners and I see a GL_DOT3_RGB option, but it doesn't describe how to use that option for per-pixel lighting or even mention the fact that it's related to lighting in any way.

Yes, I have found a million sites about per-pixel lighting, but most of them involve custom shaders and/or are unclear about what is required to make them work.

All I want is a "basic" object space normal map solution. Can anyone point me to a 1.4-only solution?

If not, at least now I know that GL_DOT3_RGB is worth looking into.

07-05-2005, 08:19 PM

07-06-2005, 05:04 AM
OK, I get that the extensions shown there are part of base OpenGL nowadays, and I think I can ignore the stuff about tangent space because I want simpler object space normals.

Thanks Dorbie!

07-06-2005, 09:41 AM
With object space normals you still have to transform light (and possibly view for speculat) vectors to object space using the modelview matrix (actually the inverse).

You only need to do this once per object but the math is the same for most matrices (afine).