Grayscale in textures

I want to create textures that are in gray format, so it is cheaper to use a 8 bit per pixel than 24/32 bit.
Which “internal format” and “format” do you suggest to me for using in “glTexImage2D”?

Thanks in advance…

Here is a comprehensive list of OpenGL image formats available. If you’re using pre-GL 3.0, then you will probably want to use one of the INTENSITY or LUMINANCE formats, listed in the “Legacy Image Formats” section.

So I am using OpenGl spec 3.1. To save memory space on the graphics card, can I use GL_RED for internal format and format to declare a grayscale?
In the fragment shader I suppose, I have to output a color with three identical figures in RGB…

More specifically, you should use GL_R8 as internal format (means 8 bit red).
Btw, you are right about the rest.

Thanks a lot!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.