GL_LUMINANCE vs. GL_INTENSITY

Hi guys.

I was wondering, what GL_INTENSITY means. I have seen it in some presentations as texture-formats, but i could not find any reference, which explains, what it is actually used for. If i understand it correct, than GL_LUMINANCE is a texture-format for grayscale images. But where is the difference when i use GL_INTENSITY?
I checked all my OpenGL books and looked at the Red Book, but GL_INTENSITY isn´t even listed as a texture format.

Well, my real problem is the following:
I want to do something with specular lighting, and i need a texture, which holds some data. Actually it is only one single value. So i thought of using a GL_LUMINANCE texture-format. But in my documentation there is only a GL_LUMINANCE16 mentioned, no GL_LUMINANCE32. I don´t know if i need it, but i think it might be usefull, since specular lighting is very dependent on high precision. So i thought of using GL_INTENSITY, but since i didn´t find any information about that, i am not sure if it will work the way i expect it to work.

Maybe someone can clear things up a bit for me.

Jan.

Both INTENSITY and LUMINANCE are single channel images. If we call a single pixels value I and L respectively, then the RGBA value for each of the two types is:

LUMINANCE: R=G=B=I, A=1.0
INTENSITY: R=G=B=A=L

Luminance is a greyscale image with alpha set to 1. Intensity is a greyscale image with alpha set to the greyscale value.

So you have a new specular solution? Care to share?

Also, if it’s just a single value, maybe you could just use the texture enviroment constant instead of a texture. You can set it by glTexEnvfv.

-Ilkka

First, thanks for the explanation. It´s a shame that none of my documentations include an explanation, although it would be very easy.

Well, no, i don´t have a NEW specular solution. All i want to do is to try the way, which is explained in “The OpenGL Extensions Guide” by Eric Lengyel. The description of the algorithm is VERY short (1 page), so i still have to do most of the work (and cannot just copy it from the book).

And it´s not only a single value, i do need a big texture to do a texture-fetch in a texture-shader, but i only need one component, i don´t need a red, a green, a blue and an alpha component. That´s what i meant with “one single value”.

I cannot really explain how the algorithm works. I first have to try it myself. But since i have not found any demo, that uses this approach, yet, i might do one, if i get it to work.

Thanks again,
Jan.

Originally posted by Jan2000:
First, thanks for the explanation. It´s a shame that none of my documentations include an explanation, although it would be very easy.

In that case you collection of documents lacks the most important one; the specification . In the 1.4 spec, look up section 3.8.13.