Jump to content
  • Advertisement
Sign in to follow this  
gfxgangsta

Using RGB value as Alpha with texture combiners

This topic is 2565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

With a fixed-function pipeline and texture combiners, is it possible to sample the RGB color of one texture and use it as the alpha channel of another texture for blending?

I can't use RGBA textures and must use RGB-only due to a special compressed texture format that my GPU can handle. I also can't use shaders / move to a programmable pipeline.

Share this post


Link to post
Share on other sites
Advertisement
It is possible to sample the alpha channel and replicate the value into the red, green and blue channels with the fixed combiners. But I don't think there is a way to get the red, green and blue channels into the alpha channel in a convenient way. Since you would need to combine three channels to create one, this operation is not really well defined anyway. You could look into the GL_DOT3_RGBA combiner function, which allows the red, green and blue channels to affect the alpha channel, and see if you can tweak the operands so that you get the desired result.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!