Sign in to follow this  

multitexture blending/masking

This topic is 3459 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

I am having a problem with blending when using multi texturing. the following works perfectly using GL_BLEND, and 2 render passes: /***********************************************************/ glEnable GL_BLEND glEnable GL_TEXTURE_2D // first pass glBlendFunc GL_ONE, GL_ZERO glBindTexture GL_TEXTURE_2D Texture0 Render // second pass glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA glBindTexture GL_TEXTURE_2D Texture1 Render glDisable GL_TEXTURE_2D glDisable GL_BLEND /***********************************************************/ but I am unable to blend the 2 textures together correctly using multi texturing with a single render pass. I have been playing around with the texture combiners, but have not understood how it works nor if it is the correct solution. /***********************************************************/ // first pass glActiveTexture GL_TEXTURE0 glEnable GL_TEXTURE_2D glBindTexture GL_TEXTURE_2D Texture0 glTexEnvf GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_REPLACE // second pass glActiveTexture GL_TEXTURE1 glEnable GL_TEXTURE_2D glBindTexture GL_TEXTURE_2D Texture1 glTexEnvf ??? Render glActiveTexture GL_TEXTURE1 glDisable GL_TEXTURE_2D glActiveTexture GL_TEXTURE0 glDisable GL_TEXTURE_2D /***********************************************************/ Please let me know if you have an ideas?

Share this post


Link to post
Share on other sites

This topic is 3459 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this