Skip to main content
GameDev.net gamedev.net
🔒 Locked

GL_LUMINANCE8_ALPHA8 renderable texture format

Started by Ysaneya Feb 3, 2009 at 5:08 AM 1 replies 3.4k views
Original Post
Ysaneya
Ysaneya
I'm looking for a renderable texture format (used by FBO) that will work on shader model 3.0+ cards ( ATI + Nvidia ) and that has two channels int8. The goal is to save as much video texture memory as possible, as I have a lot of textures. Of course my immediate reaction is to use GL_LUMINANCE8_ALPHA8 but I have some doubts: won't that be silently converted to RGBA8 by some drivers ? How can I confirm that this format truly uses 2 bytes per pixel ? Y.
MARS_999
MARS_999
Would it be possible to use GL_RGBA4? You would still get your 2bytes that way? I know at one time ATI used that format as a default for RGBA, and you needed to explicitly set it to GL_RGBA8 for better IQ...

Quote:

GL_LUMINANCE_ALPHA
Each element is a luminance/alpha pair. The GL
converts it to floating point, then assembles it
into an RGBA element by replicating the luminance
value three times for red, green, and blue. Each
component is then multiplied by the signed scale
factor GL_c_SCALE, added to the signed bias
GL_c_BIAS, and clamped to the range [0,1] (see
glPixelTransfer).



But after looking at Nvidias texture support sheet, they say NV20 and above have support for GL_LUMINANCE8_ALPHA8 and they say its not converted?

http://http.download.nvidia.com/developer/OpenGL_Texture_Formats/nv_ogl_texture_formats.pdf

[Edited by - MARS_999 on February 3, 2009 8:01:10 AM]
Ysaneya
Ysaneya
Yep, but unfortunately this texture format table hasn't been updated for ages (what a shame), so we don't know anything about modern GPUs. Plus it's only for NVidia.

RGBA4 wouldn't hold enough precision, unless I packed one value in two components. But then I would worry about artifacts due to filtering..

Y.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.