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 4 of 4

Thread: What is a Luminance Texture and How to Create?

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2013
    Posts
    9

    What is a Luminance Texture and How to Create?

    I read the Luminance textures were deprecated as of 3.0+,

    What are Luminance texture and how do you create them in OpenGL 4.0+?

    Any assistance appreciated!

    Thanks!
    BlaBZ

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    786
    AFAIK they essentially are single channel textures. In a compatibility profile you create them the same way as ever, in a core profile you use GL_RED as a format parameter for the texture - to get a single channel.

  3. #3
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    495
    Quote Originally Posted by blabz2007 View Post
    I read the Luminance textures were deprecated as of 3.0+,

    What are Luminance texture and how do you create them in OpenGL 4.0+?
    A luminance texture (one created with an internal format of GL_LUMINANCE) is monochrome. It only has a single channel which is used for all three R/G/B components, i.e. the pixels are always a shade of grey.

    In the OpenGL 3 core profile, you would use a GL_RED texture instead, and swizzle it as necessary in the shader.

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2013
    Posts
    9
    What do you mean by "swizzle?" Repeat it for each value?

Posting Permissions

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