what GL_LUMINANCE does?

working on some code i came across the commands:




just what is the GL_LUMINACE format? I tried to man it, but i couldn’ understand the explanation… Can someone put it in plain english pls???

Thx the Gunslinger

It’s single channel format where the single channel is copied into R, G and B, and alpha is set to 1. Basically, a greyscale format.

From MSDN:
GL_LUMINANCE: Each element is a single luminance value. It is converted to floating point, and then assembled into an RGBA element by replicating the luminance value three times for red, green, and blue, and attaching 1.0 for alpha. 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).

[This message has been edited by gvm (edited 02-18-2004).]

well it makes sense,
since I am passing a greyscal texture to compute the horizon mapping

thank you
the G.