Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: GL_LUMINANCE vs. GL_INTENSITY

  1. #1
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,042

    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.
    GLIM - Immediate Mode Emulation for GL3

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: GL_LUMINANCE vs. GL_INTENSITY

    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.

  3. #3
    Email address no longer exists Frequent Contributor
    Join Date
    Dec 2002
    Location
    Espoo, Finland
    Posts
    599

    Re: GL_LUMINANCE vs. GL_INTENSITY

    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

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,042

    Re: GL_LUMINANCE vs. GL_INTENSITY

    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.
    GLIM - Immediate Mode Emulation for GL3

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: GL_LUMINANCE vs. GL_INTENSITY

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •