Fetching GL_LUMINANCE_ALPHA in shader

hi folks, I have a 32 bit 3D texture I would like to fetch in a glsl program. the texture contains two 16 bit values, which I would like to treat separately. Is there an easy way to obtain the two values, via the channels (rgba) as shown below?

float v0 = texture3D(tex3D, texCoord).?;
float v1 = texture3D(tex3D, texCoord).?;

In shader the LA texture behaves like RGBA texture.
L component copied to R,G,B, and A to A.
So you access it by .R for luminance, and .A for

In some cases it may be better to access B instead of R, if the data is going through roughly the same math. In that case it may be vectorized on R300 and R420 hardware too using the natively supported .wzyx swizzle.

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