PDA

View Full Version : Using Blending & Alpha channel to achieve masking



Balance
02-21-2003, 04:28 PM
My texture loading routine sets pink 0xFF00FF to have an alpha value of 0, and all other colours to have 0xFF. I do this so that pink is not drawn in the texture, thus 'masking' without having to go through 2 passes.

This works fine, apart from the fact that I'm not using a depth buffer (I am making a 2D game, and just want things drawn in the order that I draw them) - when I blend a quad over another quad, even the fully opaque parts of the textures seem to be blended. How do I make this not happen? Why does it happen?

shinpaughp
02-21-2003, 06:32 PM
It depends on the source and destination factors you are using... what are they?

Balance
02-21-2003, 06:40 PM
It's okay now, I figured it out.