GL_LUMINANCE
is completely unnecessary in the programmable pipeline.
At its most basic level, it was a hack that allowed texture swizzling in the days of the fixed-function pipeline. These days you use GL_RED
for a single-channel texture and you can swizzle it any way you want in your fragment shader.
What you want to duplicate GL_LUMINANCE
is: vec4 (texture (...).rrr, 1.0)
. You can even do this in the fixed-function pipeline in recent OpenGL implementations using ARB_texture_swizzle
.