3D-textures - internal format

Hi

i am new to 3D-textures, i just started to do some dynamic lighting with it.
Anyway, i started with a normal RGB texture. However since 3D-textures need so much memory, i switched to GL_LUMINANCE as the internal format. This works, but it makes problems with alpha-testing. Suddenly all dark corners get invisible. So the LUMINANCE texture seems not only to modulate the color, but also the alpha-channel, which then makes the pixel invisible due to alpha-testing.
So i´d like to know, if there is an internal format, which does the same, except, that it doesn´t change the alpha-channel.
I tried GL_INTENSITY (found it in the msdn), but that seems not to work at all (or it isn´t intended for such a thing?).

And another question: Is it possible to modulate the texture-color of the second texture unit? I mean, i have a grey-scale texture as a light, but what if i want to have a red light? I mean something like glColor, which modulates the polys, but it should only modulate the texture of the second texture-unit BEFORE that one modulates the poly it gets applied to. I tried glSecondaryColor, but that didn´t work.

Well, i think it should be possible with texture_env_combine, but i don´t know much about that extension.

Thanks,
Jan.

Look at the manual for texenv and you’ll find that the key difference between luminance and intensity formats is the treatment of alpha fragments by some texenv modes.

Put simply, LUMINANCE textures pass through the polygon color alpha fragment but INTENSITY textures use the texture color for both texture color and texture alpha in the texturing operation. There are some undefined options there too for DECAL.

These seem like the only two ‘reasonable’ behaviours one might expect given that you’re only feeding one value in.

If an implementation doesn’t do this then you’ve found a bug, but I am concerned you expect something ‘magic’ to happen that the implementation cannot reasonably know.